material-table icon indicating copy to clipboard operation
material-table copied to clipboard

When column filter value changed, current page does not go to 0, when use remote data.

Open mswindu opened this issue 7 years ago • 1 comments

Describe the bug When column filter value changed, current page does not go to 0, when use remote data.

To Reproduce Steps to reproduce the behavior:

  1. Get remote data
  2. Change current page (increase)
  3. Enter some column filters
  4. Current page number hasn't been changed

Expected behavior Сurrent page number must be 0 after the change column filter value.

Desktop (please complete the following information):

  • OS: Windows
  • Browser All
  • Version v1.40.1

Additional context I suggest changing onFilterChangeDebounce method. Make it similar to onSearchChangeDebounce method.

Add to code block "if (this.isRemoteData ()) {" // reset current page query.page = 0;

mswindu avatar Jul 04 '19 05:07 mswindu

YES PLEASE! This bug starts an infinite loop of network requests and crashes my whole app.

the workaround is to store the filters in state and check to see if the filters changed in the queryData function. if they're different, reset the page to 0

dalenhughes avatar Aug 02 '19 23:08 dalenhughes