mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 10:01:26 +00:00
fix(data-vi): transform values of multiple selection fields to labels (#4398)
This commit is contained in:
parent
0626b8301d
commit
afa9f3faa4
@ -90,6 +90,9 @@ export const processData = (selectedFields: FieldOption[], data: any[], scope: a
|
||||
if (!options || !Array.isArray(options)) {
|
||||
return value;
|
||||
}
|
||||
if (Array.isArray(value)) {
|
||||
return value.map((v) => parseEnum(field, v));
|
||||
}
|
||||
const option = options.find((option) => option.value === value);
|
||||
return Schema.compile(option?.label || value, scope);
|
||||
};
|
||||
@ -104,6 +107,7 @@ export const processData = (selectedFields: FieldOption[], data: any[], scope: a
|
||||
switch (field.interface) {
|
||||
case 'select':
|
||||
case 'radioGroup':
|
||||
case 'multipleSelect':
|
||||
processed[key] = parseEnum(field, value);
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user