@konoma-development/react-components 0.3.3 → 0.3.5

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.
@@ -14384,7 +14384,13 @@ function Select({
14384
14384
  let defaultOption;
14385
14385
  let key;
14386
14386
  if (isMulti) {
14387
- defaultOption = defaultValue ? optionsInternal.filter((option) => option.value === defaultValue) : null;
14387
+ defaultOption = defaultValue ? optionsInternal.filter((option) => {
14388
+ if (!Array.isArray(defaultValue)) {
14389
+ return option.value === defaultValue;
14390
+ } else {
14391
+ return defaultValue.find((dv) => dv === option.value);
14392
+ }
14393
+ }) : null;
14388
14394
  key = defaultOption?.map((option) => option.value.toString()).join("-") || name?.toString();
14389
14395
  } else {
14390
14396
  defaultOption = defaultValue ? optionsInternal.find((option) => option.value === defaultValue) : null;