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 ...@@ -171,14 +171,11 @@ export const DefaultFieldConfigEditor: React.FC<Props> = ({ data, onChange, conf
: undefined : undefined
: (defaults as any)[item.path]; : (defaults as any)[item.path];
const label = const label = (
categoryItemCount > 1 ? ( <Label description={item.description} category={item.category?.slice(1)}>
<Label description={item.description} category={item.category?.slice(1)}> {item.name}
{item.name} </Label>
</Label> );
) : (
undefined
);
return ( return (
<Field label={label} key={`${item.id}/${item.isCustom}`}> <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