Commit bb099cb1 by Dominik Prokop Committed by GitHub

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

parent 0f174de7
......@@ -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}`}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment