@momo-kits/native-kits 0.89.33-beta.21 → 0.89.33-beta.23
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.
|
@@ -130,7 +130,7 @@ fun InputSearch(
|
|
|
130
130
|
),
|
|
131
131
|
keyboardOptions = inputSearchProps.keyboardOptions.copy(keyboardType = inputSearchProps.keyboardType),
|
|
132
132
|
keyboardActions = inputSearchProps.keyboardActions,
|
|
133
|
-
modifier =
|
|
133
|
+
modifier = inputSearchProps.modifier.height(36.dp).onFocusChanged {
|
|
134
134
|
isFocused = it.isFocused
|
|
135
135
|
if (it.isFocused) {
|
|
136
136
|
inputSearchProps.onFocus()
|
|
@@ -142,7 +142,12 @@ fun InputSearch(
|
|
|
142
142
|
decorationBox = { innerTextField ->
|
|
143
143
|
Row(verticalAlignment = Alignment.CenterVertically) {
|
|
144
144
|
Row(
|
|
145
|
-
modifier =
|
|
145
|
+
modifier = 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
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
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) {
|