milk-lib 0.0.22 → 0.0.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.
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
minWidthMenu,
|
|
29
29
|
menuGap,
|
|
30
30
|
menuMaxHeight,
|
|
31
|
-
searchable=true
|
|
31
|
+
searchable=true,
|
|
32
|
+
onClear
|
|
32
33
|
}: ISelectProps = $props();
|
|
33
34
|
|
|
34
35
|
const menuId = `select-menu-${crypto.randomUUID()}`;
|
|
@@ -155,6 +156,7 @@
|
|
|
155
156
|
const handleClear = () => {
|
|
156
157
|
hideMenu();
|
|
157
158
|
value = null;
|
|
159
|
+
onClear?.();
|
|
158
160
|
}
|
|
159
161
|
|
|
160
162
|
</script>
|
|
@@ -168,7 +170,7 @@
|
|
|
168
170
|
readonly
|
|
169
171
|
onFocus={focusHandler}
|
|
170
172
|
onKeyDown={handleControlKeyDown}
|
|
171
|
-
onClear={handleClear}
|
|
173
|
+
onClear={onClear ? handleClear : undefined}
|
|
172
174
|
pseudoFocus={isMenuVisible}
|
|
173
175
|
onClick={handleControlClick}
|
|
174
176
|
variant="contained"
|