@thecb/components 6.0.0-beta.25 → 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
@@ -20751,8 +20751,6 @@ var Dropdown = function Dropdown(_ref8) {
20751
20751
  inputChangedByAutofill = _useState14[0],
20752
20752
  setInputChangedByAutofill = _useState14[1];
20753
20753
 
20754
- var inputBox = React.useRef(null);
20755
-
20756
20754
  if (optionsState !== options) {
20757
20755
  setOptionsState(options);
20758
20756
  setOptionsChanged(true);
@@ -20772,6 +20770,7 @@ var Dropdown = function Dropdown(_ref8) {
20772
20770
  return /*#__PURE__*/React.createRef();
20773
20771
  }));
20774
20772
  var dropdownRef = React.useRef(null);
20773
+ var inputRef = React.useRef(null);
20775
20774
 
20776
20775
  var getSelection = function getSelection() {
20777
20776
  var _options$find;
@@ -20883,11 +20882,11 @@ var Dropdown = function Dropdown(_ref8) {
20883
20882
  if (isOpen && selectedRef !== undefined && selectedRef.current !== null) {
20884
20883
  // WAI-ARIA requires the selected option to receive focus
20885
20884
  selectedRef.current.focus();
20886
- inputBox.current.focus();
20885
+ console.log("input box ref", inputRef, inputRef.current);
20887
20886
  } else if (isOpen && optionRefs.current[0].current) {
20888
20887
  // If no selected option, first option receives focus
20889
20888
  optionRefs.current[0].current.focus();
20890
- inputBox.current.focus();
20889
+ console.log("input box ref", inputRef, inputRef.current);
20891
20890
  }
20892
20891
 
20893
20892
  clearTimeout(timer);
@@ -20974,7 +20973,7 @@ var Dropdown = function Dropdown(_ref8) {
20974
20973
  },
20975
20974
  padding: "12px",
20976
20975
  placeholder: getSelection(),
20977
- ref: inputBox,
20976
+ ref: inputRef,
20978
20977
  role: "combobox",
20979
20978
  themeValues: themeValues,
20980
20979
  title: hasTitles ? getSelection() : null,