Using onBlur to activate the filter instead of using onFilterChange
See original GitHub issueI am using server-side filtering, I overrode onFilterChange to activate filter every time the filter list is changed, but the problem is every time the filter list is changed, the backend API will be called to update the table’s data. It makes the layout quite lag and the backend is called too much. I want to filter every time the user leaves the field or maybe we will add the button in TableList called Submit Filter
, as soon as the user enters all the field they need to filter then click the button to activate the filter.
Tech | Version |
---|---|
Material-UI | 3.9.2 |
MUI-datatables | 2.8.0 |
React | 16.8.5 |
browser | Chrome |
etc |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:23
Top Results From Across the Web
How to subscribe for a filter changed event in ag grid
Ag grid has callbacks 'onFilterChanged' & 'onFilterModified' var gridOptions = { columnDefs: columnDefs, rowData: null, enableFilter: true, ...
Read more >Grid Events - JavaScript Data Grid
This is a list of the events that the grid raises. You register callbacks for these events through the GridOptions interface. The name...
Read more >Multiselect onBlur event not firing in KendoReact - Telerik
Hi,My code is set up as below - tabbing or using the mouse to navigate to ... not trigger the onBlur event everything...
Read more >filter - CSS: Cascading Style Sheets - MDN Web Docs - Mozilla
The filter CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering ......
Read more >Matrix Filter (A, ABBR, ACRONYM, ...)
Use the Matrix filter to create the following simple effects. Flip horizontal. ... Blur(pixelradius=2) progid:DXImageTransform.Microsoft.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@nmdhulipud this was released in 2.12.0 (see https://github.com/gregnb/mui-datatables/releases/tag/2.12.0). I have already implemented using it on a project and performance is significantly improved. Thanks @gabrielliwerant !
Mostly just to summarize what people have already said clearly.
Problem: When using the
serverSide
option,onFilterChange
andonTableChange
are often called too much. In responding to them, you end up hammering your API with new requests that aren’t really for what the user wants, since the user is not yet finished filling out their desired filters or typing in the search box.Solutions
Would you be willing to consider PRs for any/all of these things if someone were to submit them?