@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(
|
|
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
|
-
|
|
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) {
|