1e41f4b71Sopenharmony_ci# ArkUI Subsystem Changelog 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci## cl.arkui.1 Support for the undefined Parameter by Universal Events 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ciAdded support for passing **undefined** as a parameter for universal events (click, touch, show/hide, key, focus, mouse, and component area change events). 6e41f4b71Sopenharmony_ci 7e41f4b71Sopenharmony_ci**Example** 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci```ts 10e41f4b71Sopenharmony_ci// xxx.ets 11e41f4b71Sopenharmony_ci@Entry 12e41f4b71Sopenharmony_ci@Component 13e41f4b71Sopenharmony_cistruct Example { 14e41f4b71Sopenharmony_ci build() { 15e41f4b71Sopenharmony_ci Button("test") 16e41f4b71Sopenharmony_ci .onClick(()=>{ 17e41f4b71Sopenharmony_ci console.log("click"); 18e41f4b71Sopenharmony_ci }) 19e41f4b71Sopenharmony_ci .onClick(undefined) 20e41f4b71Sopenharmony_ci } 21e41f4b71Sopenharmony_ci} 22e41f4b71Sopenharmony_ci``` 23e41f4b71Sopenharmony_ci 24e41f4b71Sopenharmony_ci**Change Impact** 25e41f4b71Sopenharmony_ci 26e41f4b71Sopenharmony_ciIf the event callback parameter is **undefined**, the system will not respond to the configured event callback. 27e41f4b71Sopenharmony_ci 28e41f4b71Sopenharmony_ci 29e41f4b71Sopenharmony_ci**Key API/Component Changes** 30e41f4b71Sopenharmony_ci 31e41f4b71Sopenharmony_ciN/A 32e41f4b71Sopenharmony_ci 33e41f4b71Sopenharmony_ci**Adaptation Guide** 34e41f4b71Sopenharmony_ci 35e41f4b71Sopenharmony_ciIf the event parameter is set to **undefined**, the event is disabled. Set the parameter based on the use case. 36e41f4b71Sopenharmony_ci 37e41f4b71Sopenharmony_ci 38e41f4b71Sopenharmony_ci## cl.arkui.2 Initialization Requirement Change of @Prop/@BuilderParam Decorated Variables 39e41f4b71Sopenharmony_ci 40e41f4b71Sopenharmony_ci**Example** 41e41f4b71Sopenharmony_ci 42e41f4b71Sopenharmony_ci```ts 43e41f4b71Sopenharmony_ci// xxx.ets 44e41f4b71Sopenharmony_ci@Entry 45e41f4b71Sopenharmony_ci@Component 46e41f4b71Sopenharmony_cistruct Parent { 47e41f4b71Sopenharmony_ci @State message: string = 'Parent' 48e41f4b71Sopenharmony_ci build() { 49e41f4b71Sopenharmony_ci Column() { 50e41f4b71Sopenharmony_ci Child() // Compile time error. 51e41f4b71Sopenharmony_ci } 52e41f4b71Sopenharmony_ci } 53e41f4b71Sopenharmony_ci} 54e41f4b71Sopenharmony_ci 55e41f4b71Sopenharmony_ci@Component 56e41f4b71Sopenharmony_cistruct Child { 57e41f4b71Sopenharmony_ci @Prop message: string 58e41f4b71Sopenharmony_ci build() { 59e41f4b71Sopenharmony_ci Column() { 60e41f4b71Sopenharmony_ci 61e41f4b71Sopenharmony_ci } 62e41f4b71Sopenharmony_ci } 63e41f4b71Sopenharmony_ci} 64e41f4b71Sopenharmony_ci``` 65e41f4b71Sopenharmony_ci 66e41f4b71Sopenharmony_ci**Change Impact** 67e41f4b71Sopenharmony_ci 68e41f4b71Sopenharmony_ciIf the @Prop or @BuilderParam decorated variable is not initialized locally or initialized from its parent component, a compile time error will occur. 69e41f4b71Sopenharmony_ci 70e41f4b71Sopenharmony_ci 71e41f4b71Sopenharmony_ci**Key API/Component Changes** 72e41f4b71Sopenharmony_ci 73e41f4b71Sopenharmony_ciN/A 74e41f4b71Sopenharmony_ci 75e41f4b71Sopenharmony_ci**Adaptation Guide** 76e41f4b71Sopenharmony_ci 77e41f4b71Sopenharmony_ciAssign an initial value to the @Prop or @BuilderParam decorated variable or pass the value from the parent component. 78e41f4b71Sopenharmony_ci 79e41f4b71Sopenharmony_ci 80e41f4b71Sopenharmony_ci## cl.arkui.3 Initial Value Requirement Change of @BuilderParam Decorated Variables 81e41f4b71Sopenharmony_ci 82e41f4b71Sopenharmony_ci**Example** 83e41f4b71Sopenharmony_ci 84e41f4b71Sopenharmony_ci```ts 85e41f4b71Sopenharmony_ci// xxx.ets 86e41f4b71Sopenharmony_ci@Builder 87e41f4b71Sopenharmony_cifunction builderFunction() { 88e41f4b71Sopenharmony_ci Text('Hello Builder') 89e41f4b71Sopenharmony_ci} 90e41f4b71Sopenharmony_ci 91e41f4b71Sopenharmony_cifunction normal () { 92e41f4b71Sopenharmony_ci 93e41f4b71Sopenharmony_ci} 94e41f4b71Sopenharmony_ci 95e41f4b71Sopenharmony_ci@Component 96e41f4b71Sopenharmony_cistruct Index { 97e41f4b71Sopenharmony_ci @BuilderParam builderParam: ()=>void = builderFunction 98e41f4b71Sopenharmony_ci @BuilderParam builderParam2: ()=>void = normal // Compile time error. 99e41f4b71Sopenharmony_ci build() { 100e41f4b71Sopenharmony_ci Column() { 101e41f4b71Sopenharmony_ci 102e41f4b71Sopenharmony_ci } 103e41f4b71Sopenharmony_ci } 104e41f4b71Sopenharmony_ci} 105e41f4b71Sopenharmony_ci``` 106e41f4b71Sopenharmony_ci 107e41f4b71Sopenharmony_ci**Change Impact** 108e41f4b71Sopenharmony_ci 109e41f4b71Sopenharmony_ciIf the initial value of the @BuilderParam decorated variable is not an @Builder method, the compilation will fail. 110e41f4b71Sopenharmony_ci 111e41f4b71Sopenharmony_ci 112e41f4b71Sopenharmony_ci**Key API/Component Changes** 113e41f4b71Sopenharmony_ci 114e41f4b71Sopenharmony_ciN/A 115e41f4b71Sopenharmony_ci 116e41f4b71Sopenharmony_ci**Adaptation Guide** 117e41f4b71Sopenharmony_ci 118e41f4b71Sopenharmony_ciPass in an @Builder method as the initial value of the @BuilderParam variable. 119e41f4b71Sopenharmony_ci 120e41f4b71Sopenharmony_ci## cl.arkui.4 Type Change of the searchButton Attribute in the \<Search> Component from SearchButtonOption to SearchButtonOptions 121e41f4b71Sopenharmony_ci 122e41f4b71Sopenharmony_ci**Change Impact** 123e41f4b71Sopenharmony_ci 124e41f4b71Sopenharmony_ciIf the **SearchButtonOption** type is explicitly used, the compilation will fail. 125e41f4b71Sopenharmony_ci 126e41f4b71Sopenharmony_ci**Key API/Component Changes** 127e41f4b71Sopenharmony_ci 128e41f4b71Sopenharmony_ciThe type of the **searchButton** attribute is changed from **SearchButtonOption** to **SearchButtonOptions**. 129e41f4b71Sopenharmony_ci 130e41f4b71Sopenharmony_ci**Adaptation Guide** 131e41f4b71Sopenharmony_ci 132e41f4b71Sopenharmony_ciChange **SearchButtonOption** to **SearchButtonOptions**. 133e41f4b71Sopenharmony_ci 134e41f4b71Sopenharmony_ci## cl.arkui.5 Type Change of the BindSheet Attribute in Overlay Components from SheetStyle to SheetOptions 135e41f4b71Sopenharmony_ci 136e41f4b71Sopenharmony_ci**Change Impact** 137e41f4b71Sopenharmony_ci 138e41f4b71Sopenharmony_ciIf the **SheetStyle** type is explicitly used, the compilation will fail. 139e41f4b71Sopenharmony_ci 140e41f4b71Sopenharmony_ci**Key API/Component Changes** 141e41f4b71Sopenharmony_ci 142e41f4b71Sopenharmony_ciThe type of the **BindSheet** attribute is changed from **SheetStyle** to **SheetOptions**. 143e41f4b71Sopenharmony_ci 144e41f4b71Sopenharmony_ci**Adaptation Guide** 145e41f4b71Sopenharmony_ci 146e41f4b71Sopenharmony_ciChange **SheetStyle** to **SheetOptions**. 147e41f4b71Sopenharmony_ci 148e41f4b71Sopenharmony_ci## cl.arkui.6 Change of the Value Returned by onBackPress from void to void | boolean for Custom Components 149e41f4b71Sopenharmony_ci 150e41f4b71Sopenharmony_ci**Example** 151e41f4b71Sopenharmony_ci 152e41f4b71Sopenharmony_ci```ts 153e41f4b71Sopenharmony_ci// xxx.ets 154e41f4b71Sopenharmony_ci@Entry 155e41f4b71Sopenharmony_ci@Component 156e41f4b71Sopenharmony_cistruct Index { 157e41f4b71Sopenharmony_ci async onBackPress() {} // Compile-time error 158e41f4b71Sopenharmony_ci build() { 159e41f4b71Sopenharmony_ci Column() { 160e41f4b71Sopenharmony_ci 161e41f4b71Sopenharmony_ci } 162e41f4b71Sopenharmony_ci } 163e41f4b71Sopenharmony_ci} 164e41f4b71Sopenharmony_ci``` 165e41f4b71Sopenharmony_ci 166e41f4b71Sopenharmony_ci**Change Impact** 167e41f4b71Sopenharmony_ci 168e41f4b71Sopenharmony_ciWhen the lifecycle function **onBackPress** of a custom component is modified with **async**, the compilation fails. 169e41f4b71Sopenharmony_ci 170e41f4b71Sopenharmony_ci**Key API/Component Changes** 171e41f4b71Sopenharmony_ci 172e41f4b71Sopenharmony_ci**onBackPress? (): void** is changed to **onBackPress? (): void | boolean**. 173e41f4b71Sopenharmony_ci 174e41f4b71Sopenharmony_ci**Adaptation Guide** 175e41f4b71Sopenharmony_ci 176e41f4b71Sopenharmony_ciThe custom component lifecycle APIs are synchronous callbacks invoked by the system when appropriate. They must be used according to the synchronous API specifications defined by the SDK. Do not use modifiers such as **async** to change API specifications. 177