@northlight/ui 2.25.0 → 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 +15 -7
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +15 -7
- 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
|
@@ -12397,7 +12397,11 @@
|
|
|
12397
12397
|
);
|
|
12398
12398
|
onChangeCallback(values, event);
|
|
12399
12399
|
},
|
|
12400
|
-
value: value ? options == null ? void 0 : options.flatMap(
|
|
12400
|
+
value: value ? options == null ? void 0 : options.flatMap(
|
|
12401
|
+
(inner) => inner.options ? inner.options : inner
|
|
12402
|
+
).filter(
|
|
12403
|
+
(option) => isMulti ? value.includes(option.value) : ramda.equals(value, option.value)
|
|
12404
|
+
) : null
|
|
12401
12405
|
}, rest)
|
|
12402
12406
|
)
|
|
12403
12407
|
), /* @__PURE__ */ React.createElement(
|
|
@@ -13862,18 +13866,22 @@
|
|
|
13862
13866
|
onOptionChange,
|
|
13863
13867
|
width = "100%",
|
|
13864
13868
|
variant = "outline",
|
|
13865
|
-
|
|
13869
|
+
defaultValue,
|
|
13870
|
+
value,
|
|
13866
13871
|
menuPlacement = "bottom"
|
|
13867
13872
|
}) => {
|
|
13868
13873
|
const initialSelectedOption = React.useMemo(
|
|
13869
13874
|
() => {
|
|
13870
|
-
var _a;
|
|
13871
|
-
if (ramda.isNil(
|
|
13872
|
-
return null;
|
|
13875
|
+
var _a, _b;
|
|
13876
|
+
if (!ramda.isNil(value)) {
|
|
13877
|
+
return (_a = standardOptions.find((option) => option.value === value)) != null ? _a : null;
|
|
13873
13878
|
}
|
|
13874
|
-
|
|
13879
|
+
if (!ramda.isNil(defaultValue)) {
|
|
13880
|
+
return (_b = standardOptions.find((option) => option.value === defaultValue)) != null ? _b : null;
|
|
13881
|
+
}
|
|
13882
|
+
return null;
|
|
13875
13883
|
},
|
|
13876
|
-
[]
|
|
13884
|
+
[value]
|
|
13877
13885
|
);
|
|
13878
13886
|
const [selectedOption, setSelectedOption] = React.useState(initialSelectedOption);
|
|
13879
13887
|
const [newOptionText, setNewOptionText] = React.useState("");
|