PanelEditor Fix missing labels and description if there is only single option in category (#24905)
(cherry picked from commit bb099cb141)
This commit is contained in:
committed by
Hugo Häggmark
parent
045b8629a4
commit
a930cba373
@@ -171,14 +171,11 @@ export const DefaultFieldConfigEditor: React.FC<Props> = ({ data, onChange, conf
|
||||
: undefined
|
||||
: (defaults as any)[item.path];
|
||||
|
||||
const label =
|
||||
categoryItemCount > 1 ? (
|
||||
<Label description={item.description} category={item.category?.slice(1)}>
|
||||
{item.name}
|
||||
</Label>
|
||||
) : (
|
||||
undefined
|
||||
);
|
||||
const label = (
|
||||
<Label description={item.description} category={item.category?.slice(1)}>
|
||||
{item.name}
|
||||
</Label>
|
||||
);
|
||||
|
||||
return (
|
||||
<Field label={label} key={`${item.id}/${item.isCustom}`}>
|
||||
|
||||
Reference in New Issue
Block a user