@thecb/components 6.0.0-beta.24 → 6.0.0-beta.25

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,6 +20743,8 @@ var Dropdown = function Dropdown(_ref8) {
20743
20743
  inputChangedByAutofill = _useState14[0],
20744
20744
  setInputChangedByAutofill = _useState14[1];
20745
20745
 
20746
+ var inputBox = useRef(null);
20747
+
20746
20748
  if (optionsState !== options) {
20747
20749
  setOptionsState(options);
20748
20750
  setOptionsChanged(true);
@@ -20873,9 +20875,11 @@ var Dropdown = function Dropdown(_ref8) {
20873
20875
  if (isOpen && selectedRef !== undefined && selectedRef.current !== null) {
20874
20876
  // WAI-ARIA requires the selected option to receive focus
20875
20877
  selectedRef.current.focus();
20878
+ inputBox.current.focus();
20876
20879
  } else if (isOpen && optionRefs.current[0].current) {
20877
20880
  // If no selected option, first option receives focus
20878
20881
  optionRefs.current[0].current.focus();
20882
+ inputBox.current.focus();
20879
20883
  }
20880
20884
 
20881
20885
  clearTimeout(timer);
@@ -20962,6 +20966,7 @@ var Dropdown = function Dropdown(_ref8) {
20962
20966
  },
20963
20967
  padding: "12px",
20964
20968
  placeholder: getSelection(),
20969
+ ref: inputBox,
20965
20970
  role: "combobox",
20966
20971
  themeValues: themeValues,
20967
20972
  title: hasTitles ? getSelection() : null,