Summary
Add server-side column filtering via a filterServer prop, mirroring the existing sortServer / paginationServer opt-outs.
Motivation
Filtering is currently always client-side. It works alongside sortServer (filter runs on the server-sorted rows), but breaks with paginationServer: the client only holds the current page, so a filter can only ever match rows on that page. There is no way to filter a server-paginated dataset correctly today. See #1364 for the client-side ordering fix and the analysis of the server interaction.
Proposed change
- New
filterServer?: boolean prop (default false).
- When
true, the library skips client-side filtering entirely — filteredData becomes a pass-through — and relies on the consumer to refetch data in response to onFilterChange, the same contract as sortServer + onSort and paginationServer + onChangePage.
onFilterChange already fires with (columnId, FilterState), so the callback surface exists; this is mostly about not double-filtering on the client.
Interop notes
filterServer + paginationServer: the intended combination. Consumer sends filter + page + sort to the server and gets back the current page; library renders it as-is. paginationTotalRows drives the pagination count.
filterServer + sortServer: consumer applies filter and sort server-side together.
filterServer without server pagination: valid but unusual — consumer filters server-side and returns the full filtered set for client pagination.
Docs
Document the three server modes together (sort / paginate / filter) and how they compose, since the refetch contract is shared.
Summary
Add server-side column filtering via a
filterServerprop, mirroring the existingsortServer/paginationServeropt-outs.Motivation
Filtering is currently always client-side. It works alongside
sortServer(filter runs on the server-sorted rows), but breaks withpaginationServer: the client only holds the current page, so a filter can only ever match rows on that page. There is no way to filter a server-paginated dataset correctly today. See #1364 for the client-side ordering fix and the analysis of the server interaction.Proposed change
filterServer?: booleanprop (defaultfalse).true, the library skips client-side filtering entirely —filteredDatabecomes a pass-through — and relies on the consumer to refetch data in response toonFilterChange, the same contract assortServer+onSortandpaginationServer+onChangePage.onFilterChangealready fires with(columnId, FilterState), so the callback surface exists; this is mostly about not double-filtering on the client.Interop notes
filterServer+paginationServer: the intended combination. Consumer sends filter + page + sort to the server and gets back the current page; library renders it as-is.paginationTotalRowsdrives the pagination count.filterServer+sortServer: consumer applies filter and sort server-side together.filterServerwithout server pagination: valid but unusual — consumer filters server-side and returns the full filtered set for client pagination.Docs
Document the three server modes together (sort / paginate / filter) and how they compose, since the refetch contract is shared.