@trafilea/afrodita-components 5.0.0-beta.70 → 5.0.0-beta.71
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/build/index.esm.js +4 -1
- package/build/index.esm.js.map +1 -1
- package/build/index.js +4 -1
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.esm.js
CHANGED
|
@@ -4183,6 +4183,9 @@ function SimpleDropdown(_a) {
|
|
|
4183
4183
|
};
|
|
4184
4184
|
useEffect(function () {
|
|
4185
4185
|
if (value == null) {
|
|
4186
|
+
if (!initialValue) {
|
|
4187
|
+
setSelectedValue(undefined);
|
|
4188
|
+
}
|
|
4186
4189
|
return;
|
|
4187
4190
|
}
|
|
4188
4191
|
if (options.findIndex(function (option) { return option.value === value.value; }) < 0) {
|
|
@@ -4190,7 +4193,7 @@ function SimpleDropdown(_a) {
|
|
|
4190
4193
|
return;
|
|
4191
4194
|
}
|
|
4192
4195
|
setSelectedValue(value);
|
|
4193
|
-
}, [value, options]);
|
|
4196
|
+
}, [value, options, initialValue]);
|
|
4194
4197
|
var Button = label ? withLabel(BaseDropdown$1.Button, label) : BaseDropdown$1.Button;
|
|
4195
4198
|
return (jsxs$1(BaseDropdown$1, __assign$1({ value: selectedValue, onChange: onChangeHandler, disabled: disabled, wide: wide }, { children: [jsx$1(Button, __assign$1({ OpenIcon: Icon.Arrows.ChevronDown, CloseIcon: Icon.Arrows.ChevronUp, wide: wide, isSortOrFilter: sort, "data-testid": testId }, { children: selectedOptionLabel }), void 0), jsx$1(BaseDropdown$1.Options, { children: options.map(function (item) { return (jsx$1(BaseDropdown$1.Option, __assign$1({ value: item, disabled: false }, { children: item.label }), item.key)); }) }, void 0)] }), void 0));
|
|
4196
4199
|
}
|