@bolttech/molecules-dropdown 0.32.0 → 0.32.1
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/index.cjs +2 -2
- package/package.json +2 -2
package/index.cjs
CHANGED
|
@@ -2759,7 +2759,7 @@ const Dropdown = /*#__PURE__*/react.forwardRef((_a, ref) => {
|
|
|
2759
2759
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2760
2760
|
}, [internalSelectedOption]);
|
|
2761
2761
|
react.useEffect(() => {
|
|
2762
|
-
if (value !== (internalSelectedOption === null || internalSelectedOption === void 0 ? void 0 : internalSelectedOption.id)) {
|
|
2762
|
+
if (value && value !== (internalSelectedOption === null || internalSelectedOption === void 0 ? void 0 : internalSelectedOption.id)) {
|
|
2763
2763
|
const foundOption = optionList === null || optionList === void 0 ? void 0 : optionList.find(option => option.id === value);
|
|
2764
2764
|
setInternalSelectedOption(foundOption);
|
|
2765
2765
|
setInputValue((foundOption === null || foundOption === void 0 ? void 0 : foundOption.value) || '');
|
|
@@ -2910,7 +2910,7 @@ const DropdownWithHeaders = /*#__PURE__*/react.forwardRef((_a, ref) => {
|
|
|
2910
2910
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2911
2911
|
}, [internalSelectedOption]);
|
|
2912
2912
|
react.useEffect(() => {
|
|
2913
|
-
if (value !== (internalSelectedOption === null || internalSelectedOption === void 0 ? void 0 : internalSelectedOption.id)) {
|
|
2913
|
+
if (value && value !== (internalSelectedOption === null || internalSelectedOption === void 0 ? void 0 : internalSelectedOption.id)) {
|
|
2914
2914
|
const option = optionList === null || optionList === void 0 ? void 0 : optionList.map(currentOptionsList => {
|
|
2915
2915
|
return currentOptionsList.options.find(option => option.id === value);
|
|
2916
2916
|
}).find(item => !!item);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bolttech/molecules-dropdown",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.1",
|
|
4
4
|
"main": "./index.cjs",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@bolttech/atoms-icon": "0.23.0",
|
|
9
9
|
"@bolttech/atoms-input": "0.26.1",
|
|
10
10
|
"@bolttech/atoms-select": "0.22.0",
|
|
11
|
-
"@bolttech/default-theme": "0.9.
|
|
11
|
+
"@bolttech/default-theme": "0.9.1",
|
|
12
12
|
"@bolttech/form-engine": "3.1.0-beta.13",
|
|
13
13
|
"@bolttech/frontend-foundations": "0.10.0",
|
|
14
14
|
"@bolttech/ui-utils": "0.5.0",
|