Commit 0b6434d0 by Ryan McKinley Committed by GitHub

Overrides: show category on the overrides (#29556)

parent 22ec38b0
...@@ -33,7 +33,7 @@ export const DynamicConfigValueEditor: React.FC<DynamicConfigValueEditorProps> = ...@@ -33,7 +33,7 @@ export const DynamicConfigValueEditor: React.FC<DynamicConfigValueEditorProps> =
// eslint-disable-next-line react/display-name // eslint-disable-next-line react/display-name
const renderLabel = (includeDescription = true, includeCounter = false) => (isExpanded = false) => ( const renderLabel = (includeDescription = true, includeCounter = false) => (isExpanded = false) => (
<HorizontalGroup justify="space-between"> <HorizontalGroup justify="space-between">
<Label description={includeDescription ? item.description : undefined}> <Label category={item.category?.splice(1)} description={includeDescription ? item.description : undefined}>
{item.name} {item.name}
{!isExpanded && includeCounter && item.getItemsCount && <Counter value={item.getItemsCount(property.value)} />} {!isExpanded && includeCounter && item.getItemsCount && <Counter value={item.getItemsCount(property.value)} />}
</Label> </Label>
......
...@@ -98,8 +98,12 @@ export const OverrideEditor: React.FC<OverrideEditorProps> = ({ ...@@ -98,8 +98,12 @@ export const OverrideEditor: React.FC<OverrideEditorProps> = ({
); );
let configPropertiesOptions = registry.list().map(item => { let configPropertiesOptions = registry.list().map(item => {
let label = item.name;
if (item.category && item.category.length > 1) {
label = [...item.category!.slice(1), item.name].join(' > ');
}
return { return {
label: item.name, label,
value: item.id, value: item.id,
description: item.description, description: item.description,
}; };
......
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