@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.
@@ -13866,18 +13866,22 @@
13866
13866
  onOptionChange,
13867
13867
  width = "100%",
13868
13868
  variant = "outline",
13869
- initialValue,
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(initialValue)) {
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
- 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;
13879
13883
  },
13880
- []
13884
+ [value]
13881
13885
  );
13882
13886
  const [selectedOption, setSelectedOption] = React.useState(initialSelectedOption);
13883
13887
  const [newOptionText, setNewOptionText] = React.useState("");