@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.esm.js CHANGED
@@ -20743,8 +20743,6 @@ var Dropdown = function Dropdown(_ref8) {
20743
20743
  inputChangedByAutofill = _useState14[0],
20744
20744
  setInputChangedByAutofill = _useState14[1];
20745
20745
 
20746
- var inputBox = useRef(null);
20747
-
20748
20746
  if (optionsState !== options) {
20749
20747
  setOptionsState(options);
20750
20748
  setOptionsChanged(true);
@@ -20764,6 +20762,7 @@ var Dropdown = function Dropdown(_ref8) {
20764
20762
  return /*#__PURE__*/createRef();
20765
20763
  }));
20766
20764
  var dropdownRef = useRef(null);
20765
+ var inputRef = useRef(null);
20767
20766
 
20768
20767
  var getSelection = function getSelection() {
20769
20768
  var _options$find;
@@ -20875,11 +20874,11 @@ var Dropdown = function Dropdown(_ref8) {
20875
20874
  if (isOpen && selectedRef !== undefined && selectedRef.current !== null) {
20876
20875
  // WAI-ARIA requires the selected option to receive focus
20877
20876
  selectedRef.current.focus();
20878
- inputBox.current.focus();
20877
+ console.log("input box ref", inputRef, inputRef.current);
20879
20878
  } else if (isOpen && optionRefs.current[0].current) {
20880
20879
  // If no selected option, first option receives focus
20881
20880
  optionRefs.current[0].current.focus();
20882
- inputBox.current.focus();
20881
+ console.log("input box ref", inputRef, inputRef.current);
20883
20882
  }
20884
20883
 
20885
20884
  clearTimeout(timer);
@@ -20966,7 +20965,7 @@ var Dropdown = function Dropdown(_ref8) {
20966
20965
  },
20967
20966
  padding: "12px",
20968
20967
  placeholder: getSelection(),
20969
- ref: inputBox,
20968
+ ref: inputRef,
20970
20969
  role: "combobox",
20971
20970
  themeValues: themeValues,
20972
20971
  title: hasTitles ? getSelection() : null,