DashboardScene: Fixes issue removing override rule (#89124)

This commit is contained in:
Torkel Ödegaard
2024-06-12 18:35:10 +02:00
committed by GitHub
parent c58d09fd81
commit 636910e57e
2 changed files with 9 additions and 1 deletions
@@ -152,6 +152,14 @@ describe('PanelOptions', () => {
expect(screen.queryByLabelText(overrideRuleTooltipDescription)).not.toBeInTheDocument();
});
it('Can delete rule', async () => {
const {} = setup();
await userEvent.click(screen.getByLabelText('Remove override'));
expect(screen.queryByLabelText(overrideRuleTooltipDescription)).not.toBeInTheDocument();
});
});
it('gets library panel options when the editing a library panel', async () => {
@@ -62,7 +62,7 @@ export const PanelOptions = React.memo<Props>(({ vizManager, searchQuery, listMo
data?.series ?? [],
searchQuery,
(newConfig) => {
panel.onFieldConfigChange(newConfig);
panel.onFieldConfigChange(newConfig, true);
}
),
// eslint-disable-next-line react-hooks/exhaustive-deps