@thecb/components 6.0.0-beta.22 → 6.0.0-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.
package/package.json
CHANGED
|
@@ -232,6 +232,11 @@ const Dropdown = ({
|
|
|
232
232
|
|
|
233
233
|
useEffect(() => {
|
|
234
234
|
if (
|
|
235
|
+
/*
|
|
236
|
+
Either user has typed a value into input that matches a non-disabled option
|
|
237
|
+
or
|
|
238
|
+
user has autofilled or pasted into input a string matching a valid option
|
|
239
|
+
*/
|
|
235
240
|
(!isOpen || inputChangedByAutofill) &&
|
|
236
241
|
filteredOptions[0] &&
|
|
237
242
|
!disabledValues.includes(filteredOptions[0].value) &&
|
|
@@ -239,6 +244,9 @@ const Dropdown = ({
|
|
|
239
244
|
) {
|
|
240
245
|
setInputChangedByAutofill(false);
|
|
241
246
|
onSelect(filteredOptions[0].value);
|
|
247
|
+
if (isOpen) {
|
|
248
|
+
onClick();
|
|
249
|
+
}
|
|
242
250
|
}
|
|
243
251
|
if (optionRefs.current[0].current) {
|
|
244
252
|
optionRefs.current[0].current.focus();
|