@bolttech/molecules-dropdown 0.37.4 → 0.37.6

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.
Files changed (2) hide show
  1. package/index.cjs.js +2 -2
  2. package/package.json +2 -2
package/index.cjs.js CHANGED
@@ -3387,7 +3387,7 @@ const Dropdown = /*#__PURE__*/react.forwardRef((_a, ref) => {
3387
3387
  // eslint-disable-next-line react-hooks/exhaustive-deps
3388
3388
  }, [internalSelectedOption]);
3389
3389
  react.useEffect(() => {
3390
- if (value !== (internalSelectedOption === null || internalSelectedOption === void 0 ? void 0 : internalSelectedOption.id)) {
3390
+ if (value !== (internalSelectedOption === null || internalSelectedOption === void 0 ? void 0 : internalSelectedOption.id) && Array.isArray(optionList)) {
3391
3391
  const foundOption = optionList === null || optionList === void 0 ? void 0 : optionList.find(option => option.id === value);
3392
3392
  if (!value && internalSelectedOption) {
3393
3393
  setInternalSelectedOption(undefined);
@@ -3401,7 +3401,7 @@ const Dropdown = /*#__PURE__*/react.forwardRef((_a, ref) => {
3401
3401
  }
3402
3402
  }
3403
3403
  }
3404
- if (!isFirstRender || currentOptionList.length === 0) return;
3404
+ if (!Array.isArray(currentOptionList) || !isFirstRender || currentOptionList.length === 0) return;
3405
3405
  setInternalSelectedOption(currentOptionList.find(option => option.id === value));
3406
3406
  setIsFirstRender(false);
3407
3407
  }, [currentOptionList, setSelectedOptionOnInputValue, value, internalSelectedOption, optionList, isFirstRender, onKeyUp, onKeyDown, asyncOptionList]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bolttech/molecules-dropdown",
3
- "version": "0.37.4",
3
+ "version": "0.37.6",
4
4
  "dependencies": {
5
5
  "react": "19.1.2",
6
6
  "@bolttech/atoms-select": "0.27.4",
@@ -8,7 +8,7 @@
8
8
  "@bolttech/ui-utils": "0.6.7",
9
9
  "styled-components": "6.1.1",
10
10
  "@bolttech/atoms-icon": "0.24.9",
11
- "@bolttech/atoms-input": "0.30.4",
11
+ "@bolttech/atoms-input": "0.30.5",
12
12
  "@bolttech/default-theme": "0.18.2"
13
13
  },
14
14
  "main": "./index.cjs.js",