@bolttech/molecules-dropdown 0.30.0 → 0.31.0
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 +8 -4
- package/package.json +3 -3
package/index.cjs
CHANGED
|
@@ -2390,7 +2390,7 @@ const ContainerDropdown = /*#__PURE__*/styled__default["default"].section.withCo
|
|
|
2390
2390
|
const SectionContainer = /*#__PURE__*/styled__default["default"].section.withConfig({
|
|
2391
2391
|
displayName: "molecules-dropdownstyles__SectionContainer",
|
|
2392
2392
|
componentId: "sc-3wugi4-2"
|
|
2393
|
-
})(["position:relative;.errorMessage{padding-right:", ";padding-left:", ";label{color:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";}}.helperMessage{padding-right:", ";padding-left:", ";label{color:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";}}"], ({
|
|
2393
|
+
})(["position:relative;.errorMessage{padding-right:", ";padding-left:", ";label{color:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";}}.helperMessage{padding-right:", ";padding-left:", ";margin-top:", ";label{color:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";}}"], ({
|
|
2394
2394
|
theme
|
|
2395
2395
|
}) => theme.components.dropdown.paddingHorizontal, ({
|
|
2396
2396
|
theme
|
|
@@ -2410,6 +2410,8 @@ const SectionContainer = /*#__PURE__*/styled__default["default"].section.withCon
|
|
|
2410
2410
|
}) => theme.components.dropdown.paddingHorizontal, ({
|
|
2411
2411
|
theme
|
|
2412
2412
|
}) => theme.components.dropdown.paddingHorizontal, ({
|
|
2413
|
+
theme
|
|
2414
|
+
}) => theme.components.dropdown.gap, ({
|
|
2413
2415
|
theme,
|
|
2414
2416
|
$variant,
|
|
2415
2417
|
disabled
|
|
@@ -2845,7 +2847,9 @@ const DropdownWithHeaders = /*#__PURE__*/react.forwardRef((_a, ref) => {
|
|
|
2845
2847
|
const normalizeOptionList = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
2846
2848
|
return yield filterOptionsParam(inputValue, optionList, urlFilterOptions);
|
|
2847
2849
|
});
|
|
2848
|
-
normalizeOptionList().then(optionsResponse =>
|
|
2850
|
+
normalizeOptionList().then(optionsResponse => {
|
|
2851
|
+
setCurrentOptionList([...optionsResponse]);
|
|
2852
|
+
}).catch(error => console.error('An error happens when trying to normalize options', error));
|
|
2849
2853
|
}
|
|
2850
2854
|
}, [filterOptionsParam, optionList, urlFilterOptions, inputValue, internalSelectedOption === null || internalSelectedOption === void 0 ? void 0 : internalSelectedOption.value]);
|
|
2851
2855
|
const setSelectedOptionOnInputValue = react.useCallback(() => {
|
|
@@ -2872,9 +2876,9 @@ const DropdownWithHeaders = /*#__PURE__*/react.forwardRef((_a, ref) => {
|
|
|
2872
2876
|
}, [internalSelectedOption]);
|
|
2873
2877
|
react.useEffect(() => {
|
|
2874
2878
|
if (value !== (internalSelectedOption === null || internalSelectedOption === void 0 ? void 0 : internalSelectedOption.id)) {
|
|
2875
|
-
const option =
|
|
2879
|
+
const option = optionList === null || optionList === void 0 ? void 0 : optionList.map(currentOptionsList => {
|
|
2876
2880
|
return currentOptionsList.options.find(option => option.id === value);
|
|
2877
|
-
})
|
|
2881
|
+
}).find(item => !!item);
|
|
2878
2882
|
setInternalSelectedOption(option);
|
|
2879
2883
|
setInputValue((option === null || option === void 0 ? void 0 : option.value) || '');
|
|
2880
2884
|
if (!asyncOptionList) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bolttech/molecules-dropdown",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"main": "./index.cjs",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"@bolttech/atoms-input": "0.26.0",
|
|
10
10
|
"@bolttech/atoms-select": "0.22.0",
|
|
11
11
|
"@bolttech/default-theme": "0.8.0",
|
|
12
|
-
"@bolttech/form-engine": "3.0.1-beta.
|
|
13
|
-
"@bolttech/frontend-foundations": "0.9.
|
|
12
|
+
"@bolttech/form-engine": "3.0.1-beta.7",
|
|
13
|
+
"@bolttech/frontend-foundations": "0.9.3",
|
|
14
14
|
"@bolttech/ui-utils": "0.4.0",
|
|
15
15
|
"react": "18.2.0",
|
|
16
16
|
"react-dom": "18.2.0",
|