@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.
@@ -12397,7 +12397,11 @@
12397
12397
  );
12398
12398
  onChangeCallback(values, event);
12399
12399
  },
12400
- value: value ? options == null ? void 0 : options.flatMap((inner) => inner.options ? inner.options : inner).filter((option) => value.includes(option.value)) : null
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
- initialValue,
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(initialValue)) {
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
- return (_a = standardOptions.find((option) => option.value === initialValue)) != null ? _a : null;
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("");