KamoCRM

Checkbox selection no longer reloads the grid

Fixkamo-internal
Shipped
10 ஜூலை, 2026 அன்று 1:34 AM UTC
Author
kamo
Commit
8e82294

Selecting a row checkbox called setSelectedIds(new Set(...)), which was listed in loadLeads' useCallback deps. That gave loadLeads a new identity on every click, re-firing the `useEffect(() => loadLeads(), [loadLeads])` mount effect -> setLoading(true) blanked rowData to [] and refetched, so the just-made selection was wiped and the grid appeared to "refresh". Decouple loadLeads from selectedIds via a latest-value ref (the same "prevent circular updates" pattern already used in this file): loadLeads now reads selectedIdsRef.current for reselection and has stable [] deps, so selecting a checkbox no longer triggers a reload. Also stabilizes the realtime-reconnect and post-delete loadLeads callers.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing