fis-component 0.0.59 → 0.0.60
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/cjs/index.js +5 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +5 -2
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -73359,9 +73359,12 @@ const FISSelect = forwardRef(({ className, style, size = "md", options, value, d
|
|
|
73359
73359
|
return found ? [found] : [];
|
|
73360
73360
|
}
|
|
73361
73361
|
}, [value, multi]);
|
|
73362
|
-
const computedDisplayValue =
|
|
73362
|
+
const computedDisplayValue = () => {
|
|
73363
73363
|
if (multi) {
|
|
73364
73364
|
const count = value.length;
|
|
73365
|
+
if (count === 0) {
|
|
73366
|
+
return "";
|
|
73367
|
+
}
|
|
73365
73368
|
return multiDisplayText
|
|
73366
73369
|
? multiDisplayText(count)
|
|
73367
73370
|
: `Selected ${count.toString().padStart(2, "0")} option${count !== 1 ? "s" : ""}`;
|
|
@@ -73371,7 +73374,7 @@ const FISSelect = forwardRef(({ className, style, size = "md", options, value, d
|
|
|
73371
73374
|
return "";
|
|
73372
73375
|
return (displayValue?.(selectedItems[0]) || selectedItems[0].label);
|
|
73373
73376
|
}
|
|
73374
|
-
}
|
|
73377
|
+
};
|
|
73375
73378
|
const handleToggle = useCallback(() => {
|
|
73376
73379
|
if (!disabled)
|
|
73377
73380
|
setIsOpen((prev) => !prev);
|