@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/dist/index.cjs.js
CHANGED
|
@@ -20902,9 +20902,19 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
20902
20902
|
}));
|
|
20903
20903
|
}, [inputValue]);
|
|
20904
20904
|
React.useEffect(function () {
|
|
20905
|
-
if (
|
|
20905
|
+
if (
|
|
20906
|
+
/*
|
|
20907
|
+
Either user has typed a value into input that matches a non-disabled option
|
|
20908
|
+
or
|
|
20909
|
+
user has autofilled or pasted into input a string matching a valid option
|
|
20910
|
+
*/
|
|
20911
|
+
(!isOpen || inputChangedByAutofill) && filteredOptions[0] && !disabledValues.includes(filteredOptions[0].value) && filteredOptions[0].text != placeholder) {
|
|
20906
20912
|
setInputChangedByAutofill(false);
|
|
20907
20913
|
onSelect(filteredOptions[0].value);
|
|
20914
|
+
|
|
20915
|
+
if (isOpen) {
|
|
20916
|
+
_onClick();
|
|
20917
|
+
}
|
|
20908
20918
|
}
|
|
20909
20919
|
|
|
20910
20920
|
if (optionRefs.current[0].current) {
|