@trafilea/afrodita-components 5.0.0-beta.45 → 5.0.0-beta.46
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 +5 -1
- package/build/index.esm.js.map +1 -1
- package/build/index.js +5 -1
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.esm.js
CHANGED
|
@@ -4007,8 +4007,12 @@ function SimpleDropdown(_a) {
|
|
|
4007
4007
|
if (value == null) {
|
|
4008
4008
|
return;
|
|
4009
4009
|
}
|
|
4010
|
+
if (options.indexOf(value) < 0) {
|
|
4011
|
+
setSelectedValue(undefined);
|
|
4012
|
+
return;
|
|
4013
|
+
}
|
|
4010
4014
|
setSelectedValue(value);
|
|
4011
|
-
}, [value]);
|
|
4015
|
+
}, [value, options]);
|
|
4012
4016
|
var Button = label ? withLabel(BaseDropdown$1.Button, label) : BaseDropdown$1.Button;
|
|
4013
4017
|
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));
|
|
4014
4018
|
}
|