@momo-kits/native-kits 0.89.33-beta.25 → 0.89.33-beta.27

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.
@@ -98,6 +98,7 @@ data class InputSearchProps(
98
98
  val keyboardActions: KeyboardActions = KeyboardActions.Default,
99
99
  val modifier: Modifier = Modifier,
100
100
  val iconModifier: Modifier = Modifier,
101
+ val onClearPress: () -> Unit = {}
101
102
  )
102
103
 
103
104
  @Composable
@@ -180,6 +181,7 @@ fun InputSearch(
180
181
  lineHeight = 24.sp,
181
182
  fontWeight = inputSearchProps.fontWeight.value
182
183
  ),
184
+ maxLines = 1,
183
185
  color = placeholderColor,
184
186
  overflow = TextOverflow.Ellipsis
185
187
  )
@@ -194,7 +196,10 @@ fun InputSearch(
194
196
  size = 16.dp,
195
197
  color = AppTheme.current.colors.text.hint,
196
198
  modifier = Modifier.clickable(
197
- onClick = { inputSearchProps.text.value = "" },
199
+ onClick = {
200
+ inputSearchProps.text.value = ""
201
+ inputSearchProps.onClearPress.invoke()
202
+ },
198
203
  interactionSource = remember { MutableInteractionSource() },
199
204
  indication = null
200
205
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.89.33-beta.25",
3
+ "version": "0.89.33-beta.27",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},