@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.cjs.js CHANGED
@@ -20751,6 +20751,8 @@ var Dropdown = function Dropdown(_ref8) {
20751
20751
  inputChangedByAutofill = _useState14[0],
20752
20752
  setInputChangedByAutofill = _useState14[1];
20753
20753
 
20754
+ var inputBox = React.useRef(null);
20755
+
20754
20756
  if (optionsState !== options) {
20755
20757
  setOptionsState(options);
20756
20758
  setOptionsChanged(true);
@@ -20881,9 +20883,11 @@ var Dropdown = function Dropdown(_ref8) {
20881
20883
  if (isOpen && selectedRef !== undefined && selectedRef.current !== null) {
20882
20884
  // WAI-ARIA requires the selected option to receive focus
20883
20885
  selectedRef.current.focus();
20886
+ inputBox.current.focus();
20884
20887
  } else if (isOpen && optionRefs.current[0].current) {
20885
20888
  // If no selected option, first option receives focus
20886
20889
  optionRefs.current[0].current.focus();
20890
+ inputBox.current.focus();
20887
20891
  }
20888
20892
 
20889
20893
  clearTimeout(timer);
@@ -20970,6 +20974,7 @@ var Dropdown = function Dropdown(_ref8) {
20970
20974
  },
20971
20975
  padding: "12px",
20972
20976
  placeholder: getSelection(),
20977
+ ref: inputBox,
20973
20978
  role: "combobox",
20974
20979
  themeValues: themeValues,
20975
20980
  title: hasTitles ? getSelection() : null,