@momo-kits/native-kits 0.89.33-beta.26 → 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
|
|
@@ -195,7 +196,10 @@ fun InputSearch(
|
|
|
195
196
|
size = 16.dp,
|
|
196
197
|
color = AppTheme.current.colors.text.hint,
|
|
197
198
|
modifier = Modifier.clickable(
|
|
198
|
-
onClick = {
|
|
199
|
+
onClick = {
|
|
200
|
+
inputSearchProps.text.value = ""
|
|
201
|
+
inputSearchProps.onClearPress.invoke()
|
|
202
|
+
},
|
|
199
203
|
interactionSource = remember { MutableInteractionSource() },
|
|
200
204
|
indication = null
|
|
201
205
|
)
|