mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08:00
fix: select field to display blank when data is empty (#5762)
This commit is contained in:
parent
b59d53dde8
commit
05ed11eb15
@ -41,15 +41,15 @@ export const ReadPretty = observer(
|
||||
if (isArrayField(field) && field?.value?.length === 0) {
|
||||
return <div />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<EllipsisWithTooltip ellipsis={props.ellipsis}>
|
||||
{currentOptions.map((option, key) => (
|
||||
<Tag key={key} color={option[fieldNames.color]} icon={option.icon}>
|
||||
{option[fieldNames.label]}
|
||||
</Tag>
|
||||
))}
|
||||
{field.value &&
|
||||
currentOptions.map((option, key) => (
|
||||
<Tag key={key} color={option[fieldNames.color]} icon={option.icon}>
|
||||
{option[fieldNames.label]}
|
||||
</Tag>
|
||||
))}
|
||||
</EllipsisWithTooltip>
|
||||
</div>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user