@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "5.11.4",
3
+ "version": "6.0.0-beta.2",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -120,7 +120,11 @@ const Dropdown = ({
120
120
  const onKeyDown = e => {
121
121
  const { key, keyCode } = e;
122
122
  const focus = document.activeElement;
123
+ console.log("dropdown value is", value);
124
+ console.log("focus is", focus);
125
+ console.log("option refs are", optionRefs.current);
123
126
  const optionEl = optionRefs.current.find(ref => ref.current === focus);
127
+ console.log("option el is", optionEl);
124
128
  switch (key) {
125
129
  case "ArrowDown":
126
130
  e.preventDefault();
@@ -155,6 +159,8 @@ const Dropdown = ({
155
159
  break;
156
160
  case "Backspace" || "Delete":
157
161
  e.preventDefault();
162
+ console.log("input value is", inputValue);
163
+ console.log("new input value will be", inputValue.slice(0, -1));
158
164
  setInputValue(inputValue.slice(0, -1));
159
165
  break;
160
166
  }
@@ -165,6 +171,11 @@ const Dropdown = ({
165
171
  };
166
172
 
167
173
  useEffect(() => {
174
+ console.log(
175
+ "option refs in isopen useffect",
176
+ optionRefs.current[0].current
177
+ );
178
+ console.log("value in isopen useffect", value);
168
179
  if (isOpen && optionRefs.current[0].current) {
169
180
  optionRefs.current[0].current.focus();
170
181
  }