1# ArkUI Subsystem Changelog 2 3## cl.arkui.1 Change of the ScrollState Enum Rules 4 5The table lists the rules for the **ScrollState** enums in API version 9 and earlier versions: 6 7| Name | Description | 8| ------ | ------------------------------ | 9| Idle | Idle. The list enters this state when an API in the controller is used to scroll the list or when the scrollbar is dragged. | 10| Scroll | Scrolling. The list enters this state when the user drags the list to scroll. | 11| Fling | Inertial scrolling. The list enters this state when inertial scrolling occurs or when the list bounces back after being released from a fling.| 12 13The table lists the rules for the **ScrollState** enums in API version 10 and later versions: 14 15| Name | Description | 16| ------ | ------------------------------ | 17| Idle | Idle. The list enters this state when it is not scrolling or an API in the controller that does not apply an animation is called. | 18| Scroll | Scrolling. The list enters this state when the user drags the list, scrollbar, or mouse wheel to scroll the list. | 19| Fling | Inertial scrolling. The list enters this state when: inertial scrolling occurs after a fling; the list bounces back after being released from a fling; inertial scrolling occurs after quick dragging of the built-in scrollbar; scrolling occurs after an API in the controller that applies an animation is called.| 20 21The table below lists the changes in the **ScrollState** enums. 22 23| Scenario | API Version 9 and Earlier |API Version 10 and Later | 24| ------ | ------------------------------ |------------------------------ | 25| Finger dragging | Scroll | Scroll | 26| Inertial scrolling | Fling | Fling | 27| Cross-boundary bouncing | Fling | Fling | 28| Scrolling by mouse wheel | Idle | Scroll | 29| Scrollbar dragging | Idle | Scroll | 30| Scrolling by the scrolling controller (with animation) | Idle | Fling | 31| Scrolling by the scrolling controller (without animation) | Idle | Idle | 32 33**Change Impact** 34 351. **ScrollState** is available since API version 7. The change is introduced in API version 10 and does not affect the use in API version 9 and earlier versions. 362. Since API version 10, the use of **ScrollState** is affected in the **onScroll** event of the **\<List>** component. 37 38**Key API/Component Changes** 39 40 41- [List Events](../../../application-dev/reference/arkui-ts/ts-container-list.md#events) 42- [ScrollState](../../../application-dev/reference/arkui-ts/ts-container-list.md#scrollstate) 43 44**Adaptation Guide** 45 46When the **\<List>** component is bound to the **onScroll** event and reports the scrolling status through the event, it must comply with the new rules since API version 10. 47 48The code snippet is as follows: 49```ts 50// xxx.ets 51@Entry 52@Component 53struct ListExample { 54 private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 55 56 build() { 57 Column() { 58 List({ space: 20, initialIndex: 0 }) { 59 ForEach(this.arr, (item) => { 60 ListItem() { 61 Text('' + item) 62 .width('100%').height(100).fontSize(16) 63 .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) 64 } 65 }, item => item) 66 } 67 .listDirection(Axis.Vertical) // Arrangement direction 68 .edgeEffect(EdgeEffect.Spring) // Set the edge scrolling effect to Spring. 69 .onScroll((scrollOffset: number, scrollState: ScrollState) => { 70 console.log(`onScroll scrollState = ${ScrollState[scrollState]}, scrollOffset = ${[scrollOffset]}`) 71 }) 72 .width('90%') 73 } 74 .width('100%') 75 .height('100%') 76 .backgroundColor(0xDCDCDC) 77 .padding({ top: 5 }) 78 } 79} 80``` 81 82## cl.arkui.2 Change of Use Case Restrictions of ArkUI Built-in Components 83 84Restricted the use of ArkUI built-in components to the build methods of structs, **pageTransition** method, or @Builder decorated functions. 85 86**Example** 87 88``` 89@Entry 90@Component 91struct Index { 92 build() { 93 Row() { 94 } 95 96 } 97} 98// ERROR:UI component 'Text' cannot be used in this place. 99Text('Hello World') 100``` 101 102**Change Impact** 103 104 A build error will occur if a built-in component is not used in a build method of a struct, **pageTransition** method, or any @Builder decorated function. 105 106**Key API/Component Changes** 107 108N/A 109 110**Adaptation Guide** 111 112Use ArkUI built-in components only in build methods of structs, **pageTransition** methods, and @Builder decorated functions. 113 114## cl.arkui.3 \<RowSplit> and \<ColumnSplit> Component Layout and Behavior Changes 115 1161. Changed the default size of the **\<RowSplit>** or **\<ColumnSplit>** component on the cross axis from adapting to the parent component size to adapting to the child component size. 117 1182. Changed how the child components behave when the**\<RowSplit>** or **\<ColumnSplit>** component's divider is dragged: 119 120 - Before the change, the child components are translated without being compressed or stretched. 121 122 - After the change, the child components are compressed and stretched. 123 1243. Changed the clipping area of child components for when the **clip** attribute is used to clip the child component content that exceeds the component area: 125 126 - For **\<RowSplit>**, the clipping area is changed from the right side to both the left and right sides of the child component area. 127 128 - For **\<ColumnSplit>**, the clipping area is changed from the bottom to both the top and bottom of the child component area. 129 130**Change Impact** 131The preceding changes affect the **\<RowSplit>** and **\<ColumnSplit>** components in API version 10 and later versions. 132 133**Key API/Component Changes** 134 135N/A 136 137## cl.arkui.4 Changes in Layout and Behavior of \<Search>, \<TextInput>, and \<TextArea> Components 138 1391. Changed the position of the edited text area in the **\<Search>**, **\<TextInput>**, and \**<TextArea>** components from moving by the distance specified by **padding** to moving by the distance specified by **padding** and **border**. 1402. Changed the width of the text field in the **\<Search>** component from the component width minus the width and the left and right margins of the search icon, to the component width minus the width of the paddings and borders as well as the width and the left and right margins of the search icon. 141 142**Change Impact** 143 144The change affects only applications of API version 10 and later versions. 145 146**Key API/Component Changes** 147 148N/A 149 150**Adaptation Guide** 151 152N/A 153