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