Dashboards: Pass id prop to Switch component for bool inputs (#106438)

This commit is contained in:
kay delaney
2025-06-11 12:45:14 +01:00
committed by GitHub
parent eaac4a69fb
commit 66f79e53e5
2 changed files with 2 additions and 3 deletions
@@ -87,8 +87,7 @@ export const getAllOptionEditors = () => {
name: 'Boolean',
description: 'Allows boolean values input',
editor(props) {
const { id, ...rest } = props; // Remove id from properties passed into switch
return <Switch {...rest} onChange={(e) => props.onChange(e.currentTarget.checked)} />;
return <Switch {...props} onChange={(e) => props.onChange(e.currentTarget.checked)} />;
},
};
@@ -122,7 +122,7 @@ export function getLayerEditor(opts: LayerEditorOptions): NestedPanelOptions<Map
});
}
builder.addBooleanSwitch({
path: 'tooltip',
path: 'layer-tooltip',
name: 'Display tooltip',
description: 'Show the tooltip for layer',
defaultValue: true,