Dashboards: Pass id prop to Switch component for bool inputs (#106438)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user