@thecb/components 6.0.0-beta.16 → 6.0.0-beta.17
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/package.json
CHANGED
|
@@ -21,7 +21,7 @@ const IconWrapper = styled.div`
|
|
|
21
21
|
flex-direction: column;
|
|
22
22
|
justify-content: center;
|
|
23
23
|
transition: transform 0.3s ease;
|
|
24
|
-
${({ open }) => (open ? "transform: rotate(-180deg)" : "")}
|
|
24
|
+
${({ open }) => (open ? "transform: rotate(-180deg)" : "")};
|
|
25
25
|
top: 20px;
|
|
26
26
|
right: 12px;
|
|
27
27
|
`;
|
|
@@ -123,7 +123,7 @@ const Dropdown = ({
|
|
|
123
123
|
value ? options.find(option => option.value === value)?.text : placeholder;
|
|
124
124
|
|
|
125
125
|
const onKeyDown = e => {
|
|
126
|
-
console.log("current input value", inputValue);
|
|
126
|
+
console.log("current input value top of keyDown", inputValue);
|
|
127
127
|
const { key, keyCode } = e;
|
|
128
128
|
const focus = document.activeElement;
|
|
129
129
|
console.log("dropdown value is", value);
|
|
@@ -185,6 +185,7 @@ const Dropdown = ({
|
|
|
185
185
|
}
|
|
186
186
|
if ((keyCode > 64 && keyCode < 91) || keyCode == 32 || keyCode == 189) {
|
|
187
187
|
e.preventDefault();
|
|
188
|
+
console.log("current input value inside keydown if", inputValue);
|
|
188
189
|
setInputValue(inputValue + key);
|
|
189
190
|
}
|
|
190
191
|
};
|
|
@@ -283,7 +284,7 @@ const Dropdown = ({
|
|
|
283
284
|
}
|
|
284
285
|
}}
|
|
285
286
|
onChange={e => {
|
|
286
|
-
console.log("current input value", inputValue);
|
|
287
|
+
console.log("current input value onChange", inputValue);
|
|
287
288
|
console.log("input change event", e.target);
|
|
288
289
|
console.log("input change event value", e.target.value);
|
|
289
290
|
setInputValue(e.target.value);
|
|
@@ -337,6 +338,9 @@ const Dropdown = ({
|
|
|
337
338
|
: () => {
|
|
338
339
|
setSelectedRef(optionRefs.current[i]);
|
|
339
340
|
onSelect(choice.value);
|
|
341
|
+
if (isOpen) {
|
|
342
|
+
onClick();
|
|
343
|
+
}
|
|
340
344
|
}
|
|
341
345
|
}
|
|
342
346
|
selected={choice.value === value}
|