From b9eeab7f208e1e9ff7310e67ceb1118eea40d67a Mon Sep 17 00:00:00 2001 From: Matthieu Moquet Date: Thu, 14 Nov 2024 12:19:55 +0100 Subject: [PATCH] fix: history push for group change --- src/components/alerts/group-select.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/alerts/group-select.tsx b/src/components/alerts/group-select.tsx index 3bd421a..9317391 100644 --- a/src/components/alerts/group-select.tsx +++ b/src/components/alerts/group-select.tsx @@ -25,7 +25,7 @@ export default function GroupSelect(props: Props) { const { labels, defaultValue } = props; const [open, setOpen] = useState(false); - const [value, setValue] = useQueryState('group', { defaultValue }); + const [value, setValue] = useQueryState('group', { defaultValue, history: 'push' }); return (
@@ -67,7 +67,7 @@ export default function GroupSelect(props: Props) { key={label} value={label} onSelect={(currentValue) => { - setValue(currentValue === value ? "" : currentValue); + setValue(currentValue); setOpen(false); }} >