sadmann7 / shadcn-table

A shadcn table component with server-side sorting, filtering, and pagination.

Home Page:https://table.sadmn.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Selection persists when pagination and/or filters change

AndKenneth opened this issue · comments

If I select the first item in the list, when I move to the next page the first item is still selected. I've fixed this in useDataTable in our project by simply adding this

image

Not sure if this is a good approach (notably if I increase the per-page this won't persist already selected items), and I've notice it still happens when I select filters.

see where the pagination change code and add this:
table.toggleAllRowsSelected(false);

I'm having the same issue and I'm not being able to fix it.