PanelEditor Fix missing labels and description if there is only single option in category (#24905)

This commit is contained in:
Dominik Prokop
2020-05-20 13:54:42 +02:00
committed by GitHub
parent 0f174de760
commit bb099cb141
@@ -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}`}>