@momo-kits/native-kits 0.89.33-beta.21 → 0.89.33-beta.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -142,7 +142,12 @@ fun InputSearch(
142
142
  decorationBox = { innerTextField ->
143
143
  Row(verticalAlignment = Alignment.CenterVertically) {
144
144
  Row(
145
- modifier = inputSearchProps.modifier.weight(inputSearchProps.showButtonText.ifTrue(8f, 1f))
145
+ modifier = inputSearchProps.modifier.weight(
146
+ inputSearchProps.showButtonText.ifTrue(
147
+ 8f,
148
+ 1f
149
+ )
150
+ )
146
151
  .background(
147
152
  inputSearchProps.backgroundColor,
148
153
  RoundedCornerShape(Radius.XL)
@@ -177,7 +182,7 @@ fun InputSearch(
177
182
  }
178
183
  innerTextField()
179
184
  }
180
- if (isFocused && inputSearchProps.text.value.isNotEmpty()) {
185
+ if (inputSearchProps.clearCondition?.invoke() == true || (isFocused && inputSearchProps.text.value.isNotEmpty())) {
181
186
  Row {
182
187
  Spacer(Modifier.width(Spacing.XS))
183
188
  Icon(
@@ -192,14 +197,12 @@ fun InputSearch(
192
197
  )
193
198
  }
194
199
  }
195
- if (inputSearchProps.clearCondition?.invoke() == true) {
196
- RenderRightIconSearch(
197
- inputSearchProps.loading,
198
- inputSearchProps.icon,
199
- iconTintColor,
200
- inputSearchProps.onRightIconPressed
201
- )
202
- }
200
+ RenderRightIconSearch(
201
+ inputSearchProps.loading,
202
+ inputSearchProps.icon,
203
+ iconTintColor,
204
+ inputSearchProps.onRightIconPressed
205
+ )
203
206
  }
204
207
  }
205
208
  if (inputSearchProps.showButtonText) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.89.33-beta.21",
3
+ "version": "0.89.33-beta.22",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},