@thecb/components 6.0.0-beta.7 → 6.0.0-beta.8
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
|
@@ -19528,6 +19528,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19528
19528
|
var onKeyDown = function onKeyDown(e) {
|
|
19529
19529
|
var _optionRefs$current$l, _optionRefs$current;
|
|
19530
19530
|
|
|
19531
|
+
console.log("key down event is", e);
|
|
19531
19532
|
var key = e.key,
|
|
19532
19533
|
keyCode = e.keyCode;
|
|
19533
19534
|
var focus = document.activeElement;
|
|
@@ -19602,11 +19603,12 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19602
19603
|
};
|
|
19603
19604
|
|
|
19604
19605
|
React.useEffect(function () {
|
|
19605
|
-
console.log("option refs in isopen useffect", optionRefs
|
|
19606
|
+
console.log("option refs in isopen useffect", optionRefs);
|
|
19607
|
+
console.log("option ref current in isopen useffect", optionRefs.current[0].current);
|
|
19606
19608
|
console.log("selected refs in isopen useffect", selectedRef);
|
|
19607
19609
|
console.log("value in isopen useffect", value);
|
|
19608
19610
|
|
|
19609
|
-
if (isOpen && selectedRef !== undefined) {
|
|
19611
|
+
if (isOpen && selectedRef !== undefined && selectedRef.current !== null) {
|
|
19610
19612
|
// WAI-ARIA requires the selected option to receive focus
|
|
19611
19613
|
selectedRef.current.focus();
|
|
19612
19614
|
} else if (isOpen && optionRefs.current[0].current) {
|
|
@@ -19622,7 +19624,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19622
19624
|
clearTimeout(timer);
|
|
19623
19625
|
setTimer(setTimeout(function () {
|
|
19624
19626
|
return setInputValue("");
|
|
19625
|
-
},
|
|
19627
|
+
}, 3000));
|
|
19626
19628
|
}
|
|
19627
19629
|
|
|
19628
19630
|
setFilteredOptions(options.filter(function (option) {
|
|
@@ -19675,7 +19677,9 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19675
19677
|
"aria-label": getSelection(),
|
|
19676
19678
|
placeholder: getSelection(),
|
|
19677
19679
|
value: inputValue,
|
|
19678
|
-
onChange:
|
|
19680
|
+
onChange: function onChange(e) {
|
|
19681
|
+
console.log("input change event", e);
|
|
19682
|
+
},
|
|
19679
19683
|
themeValues: themeValues,
|
|
19680
19684
|
role: "searchbox",
|
|
19681
19685
|
type: "text",
|