@northlight/ui 2.25.1 → 2.26.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/dist/es/northlight.d.ts +8 -3
- package/dist/es/northlight.js +10 -6
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +10 -6
- package/dist/umd/northlight.cjs.map +1 -1
- package/dist/umd/northlight.min.cjs +3 -3
- package/dist/umd/northlight.min.cjs.map +1 -1
- package/package.json +2 -2
package/dist/umd/northlight.cjs
CHANGED
|
@@ -13866,18 +13866,22 @@
|
|
|
13866
13866
|
onOptionChange,
|
|
13867
13867
|
width = "100%",
|
|
13868
13868
|
variant = "outline",
|
|
13869
|
-
|
|
13869
|
+
defaultValue,
|
|
13870
|
+
value,
|
|
13870
13871
|
menuPlacement = "bottom"
|
|
13871
13872
|
}) => {
|
|
13872
13873
|
const initialSelectedOption = React.useMemo(
|
|
13873
13874
|
() => {
|
|
13874
|
-
var _a;
|
|
13875
|
-
if (ramda.isNil(
|
|
13876
|
-
return null;
|
|
13875
|
+
var _a, _b;
|
|
13876
|
+
if (!ramda.isNil(value)) {
|
|
13877
|
+
return (_a = standardOptions.find((option) => option.value === value)) != null ? _a : null;
|
|
13877
13878
|
}
|
|
13878
|
-
|
|
13879
|
+
if (!ramda.isNil(defaultValue)) {
|
|
13880
|
+
return (_b = standardOptions.find((option) => option.value === defaultValue)) != null ? _b : null;
|
|
13881
|
+
}
|
|
13882
|
+
return null;
|
|
13879
13883
|
},
|
|
13880
|
-
[]
|
|
13884
|
+
[value]
|
|
13881
13885
|
);
|
|
13882
13886
|
const [selectedOption, setSelectedOption] = React.useState(initialSelectedOption);
|
|
13883
13887
|
const [newOptionText, setNewOptionText] = React.useState("");
|