@thecb/components 5.11.4 → 6.0.0-beta.2
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
|
@@ -19522,9 +19522,13 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19522
19522
|
var key = e.key,
|
|
19523
19523
|
keyCode = e.keyCode;
|
|
19524
19524
|
var focus = document.activeElement;
|
|
19525
|
+
console.log("dropdown value is", value);
|
|
19526
|
+
console.log("focus is", focus);
|
|
19527
|
+
console.log("option refs are", optionRefs.current);
|
|
19525
19528
|
var optionEl = optionRefs.current.find(function (ref) {
|
|
19526
19529
|
return ref.current === focus;
|
|
19527
19530
|
});
|
|
19531
|
+
console.log("option el is", optionEl);
|
|
19528
19532
|
|
|
19529
19533
|
switch (key) {
|
|
19530
19534
|
case "ArrowDown":
|
|
@@ -19568,6 +19572,8 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19568
19572
|
|
|
19569
19573
|
case "Backspace" :
|
|
19570
19574
|
e.preventDefault();
|
|
19575
|
+
console.log("input value is", inputValue);
|
|
19576
|
+
console.log("new input value will be", inputValue.slice(0, -1));
|
|
19571
19577
|
setInputValue(inputValue.slice(0, -1));
|
|
19572
19578
|
break;
|
|
19573
19579
|
}
|
|
@@ -19579,6 +19585,9 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19579
19585
|
};
|
|
19580
19586
|
|
|
19581
19587
|
React.useEffect(function () {
|
|
19588
|
+
console.log("option refs in isopen useffect", optionRefs.current[0].current);
|
|
19589
|
+
console.log("value in isopen useffect", value);
|
|
19590
|
+
|
|
19582
19591
|
if (isOpen && optionRefs.current[0].current) {
|
|
19583
19592
|
optionRefs.current[0].current.focus();
|
|
19584
19593
|
}
|