@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.esm.js CHANGED
@@ -20762,6 +20762,7 @@ var Dropdown = function Dropdown(_ref8) {
20762
20762
  return /*#__PURE__*/createRef();
20763
20763
  }));
20764
20764
  var dropdownRef = useRef(null);
20765
+ var inputRef = useRef(null);
20765
20766
 
20766
20767
  var getSelection = function getSelection() {
20767
20768
  var _options$find;
@@ -20873,9 +20874,11 @@ var Dropdown = function Dropdown(_ref8) {
20873
20874
  if (isOpen && selectedRef !== undefined && selectedRef.current !== null) {
20874
20875
  // WAI-ARIA requires the selected option to receive focus
20875
20876
  selectedRef.current.focus();
20877
+ console.log("input box ref", inputRef, inputRef.current);
20876
20878
  } else if (isOpen && optionRefs.current[0].current) {
20877
20879
  // If no selected option, first option receives focus
20878
20880
  optionRefs.current[0].current.focus();
20881
+ console.log("input box ref", inputRef, inputRef.current);
20879
20882
  }
20880
20883
 
20881
20884
  clearTimeout(timer);
@@ -20905,7 +20908,9 @@ var Dropdown = function Dropdown(_ref8) {
20905
20908
  onSelect(filteredOptions[0].value);
20906
20909
 
20907
20910
  if (isOpen) {
20908
- _onClick();
20911
+ setTimeout(function () {
20912
+ return _onClick();
20913
+ }, 2000);
20909
20914
  }
20910
20915
  }
20911
20916
 
@@ -20960,6 +20965,7 @@ var Dropdown = function Dropdown(_ref8) {
20960
20965
  },
20961
20966
  padding: "12px",
20962
20967
  placeholder: getSelection(),
20968
+ ref: inputRef,
20963
20969
  role: "combobox",
20964
20970
  themeValues: themeValues,
20965
20971
  title: hasTitles ? getSelection() : null,