[v11.1.x] DashboardScene: Fixes issue removing override rule (#89136)

This commit is contained in:
grafana-delivery-bot[bot]
2024-06-13 09:42:58 +02:00
committed by GitHub
parent 37b9dc0a37
commit 96ba44c802
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