There was an error while loading. Please reload this page.
1 parent 3d8433a commit 68dbabfCopy full SHA for 68dbabf
1 file changed
packages/ui/src/FormWidgets/Select/index.tsx
@@ -251,11 +251,16 @@ export const Select = <T extends string | number>({
251
252
const selectedOptions = useMemo(() => {
253
if (multiple) {
254
- if (!value?.length) return "";
+ if (!value?.length) {
255
+ return "";
256
+ }
257
- return normalizedOptions
- .filter((opt) => value.includes(opt.value as T))
258
- .map((opt) => opt.label)
+ return value
259
+ .map(
260
+ (value_) =>
261
+ normalizedOptions.find((opt) => opt.value === value_)?.label,
262
+ )
263
+ .filter(Boolean)
264
.join(", ");
265
}
266
0 commit comments