@box/blueprint-web 6.14.0 → 6.15.0
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.
|
@@ -187,6 +187,12 @@ const RootInner = ({
|
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
}, [clearOnEscape, isOpen, multiselect, setInputValue, setOpen, setSelectedValue]);
|
|
190
|
+
const handleOnKeyUp = useCallback(event => {
|
|
191
|
+
// Clear selected value when the input is empty for single-select variant
|
|
192
|
+
if (inputValue === '' && !multiselect) {
|
|
193
|
+
setSelectedValue('');
|
|
194
|
+
}
|
|
195
|
+
}, [inputValue, multiselect, setSelectedValue]);
|
|
190
196
|
// Reset input on blur
|
|
191
197
|
const handleOnBlur = useCallback(() => {
|
|
192
198
|
if (!clearOnBlur || isOpen) {
|
|
@@ -248,6 +254,7 @@ const RootInner = ({
|
|
|
248
254
|
id: comboboxId,
|
|
249
255
|
onBlur: handleOnBlur,
|
|
250
256
|
onKeyDown: handleKeyDown,
|
|
257
|
+
onKeyUp: handleOnKeyUp,
|
|
251
258
|
required: required,
|
|
252
259
|
store: comboboxStore
|
|
253
260
|
})
|
|
@@ -272,6 +279,7 @@ const RootInner = ({
|
|
|
272
279
|
label: label,
|
|
273
280
|
onBlur: handleOnBlur,
|
|
274
281
|
onKeyDown: handleKeyDown,
|
|
282
|
+
onKeyUp: handleOnKeyUp,
|
|
275
283
|
required: required
|
|
276
284
|
}),
|
|
277
285
|
store: comboboxStore
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/blueprint-web",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.15.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@box/storybook-utils": "^0.0.3"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "1cb81c22422493ae61f0e7362180d8d07e03ba2e",
|
|
61
61
|
"module": "lib-esm/index.js",
|
|
62
62
|
"main": "lib-esm/index.js",
|
|
63
63
|
"exports": {
|