fix(frontend): stop group modals clearing selection on background refetch

The reset effect in GroupAddClientsModal and GroupRemoveClientsModal
depended on the memoized rows, which are rebuilt whenever GroupsPage
re-renders because candidates/members are inline-filtered arrays. The
5s client-list poll re-renders the page, so any selection made in the
modal was wiped a few seconds later. Reset only when the modal opens.
This commit is contained in:
MHSanaei
2026-07-02 23:00:04 +02:00
parent 1bf6f606bc
commit 9f760cf0fa
2 changed files with 2 additions and 2 deletions
@@ -50,7 +50,7 @@ export default function GroupAddClientsModal({
if (!open) return;
setSelectedEmails([]);
setSearch('');
}, [open, rows]);
}, [open]);
const filteredRows = useMemo(() => {
const q = search.trim().toLowerCase();
@@ -48,7 +48,7 @@ export default function GroupRemoveClientsModal({
if (!open) return;
setSelectedEmails([]);
setSearch('');
}, [open, rows]);
}, [open]);
const filteredRows = useMemo(() => {
const q = search.trim().toLowerCase();