@thecb/components 6.0.0-beta.23 → 6.0.0-beta.26
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
|
@@ -20770,6 +20770,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
20770
20770
|
return /*#__PURE__*/React.createRef();
|
|
20771
20771
|
}));
|
|
20772
20772
|
var dropdownRef = React.useRef(null);
|
|
20773
|
+
var inputRef = React.useRef(null);
|
|
20773
20774
|
|
|
20774
20775
|
var getSelection = function getSelection() {
|
|
20775
20776
|
var _options$find;
|
|
@@ -20881,9 +20882,11 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
20881
20882
|
if (isOpen && selectedRef !== undefined && selectedRef.current !== null) {
|
|
20882
20883
|
// WAI-ARIA requires the selected option to receive focus
|
|
20883
20884
|
selectedRef.current.focus();
|
|
20885
|
+
console.log("input box ref", inputRef, inputRef.current);
|
|
20884
20886
|
} else if (isOpen && optionRefs.current[0].current) {
|
|
20885
20887
|
// If no selected option, first option receives focus
|
|
20886
20888
|
optionRefs.current[0].current.focus();
|
|
20889
|
+
console.log("input box ref", inputRef, inputRef.current);
|
|
20887
20890
|
}
|
|
20888
20891
|
|
|
20889
20892
|
clearTimeout(timer);
|
|
@@ -20913,7 +20916,9 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
20913
20916
|
onSelect(filteredOptions[0].value);
|
|
20914
20917
|
|
|
20915
20918
|
if (isOpen) {
|
|
20916
|
-
|
|
20919
|
+
setTimeout(function () {
|
|
20920
|
+
return _onClick();
|
|
20921
|
+
}, 2000);
|
|
20917
20922
|
}
|
|
20918
20923
|
}
|
|
20919
20924
|
|
|
@@ -20968,6 +20973,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
20968
20973
|
},
|
|
20969
20974
|
padding: "12px",
|
|
20970
20975
|
placeholder: getSelection(),
|
|
20976
|
+
ref: inputRef,
|
|
20971
20977
|
role: "combobox",
|
|
20972
20978
|
themeValues: themeValues,
|
|
20973
20979
|
title: hasTitles ? getSelection() : null,
|