Mui-datatables: Add option to prevent reset of pagination on onSearchClose callback

Created on 14 Oct 2019  路  6Comments  路  Source: gregnb/mui-datatables

Hi, is there any way on how to prevent pagination reset when clicking the close search icon?
Because in my case, I don't want to reset the page when the user click the search icon and then close the search without typing any search text.

bug

Most helpful comment

Thanks for offering @phanshiwen, but I've already got one locally, I just wanted to push other things first so I could use some new functions.

If you still want to help in other ways, there are plenty of things needed, such as boosting the test coverage or improving compliance with material-ui v4!

All 6 comments

I think this is a bug. :)
The pagination always change to 1-10 of 124, here are the steps:

  1. click the next button for page 2 (the pagination will become: 11-20 of 124)
  2. click the search icon, then close it without typing any text in the search input
  3. notice the pagination will become 1-10 of 124

Here is the codesandbox:
https://codesandbox.io/s/boring-darkness-uqqjw

I can confirm the bug, thanks for reporting @kenjoegolo.

Maybe I can open a pull request for this?

Thanks for offering @phanshiwen, but I've already got one locally, I just wanted to push other things first so I could use some new functions.

If you still want to help in other ways, there are plenty of things needed, such as boosting the test coverage or improving compliance with material-ui v4!

Can't wait to get those fixes :)

PR up, fix will be in a patch release, coming soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pranavtheway picture pranavtheway  路  3Comments

T-pirithiviraj picture T-pirithiviraj  路  3Comments

demoreno picture demoreno  路  4Comments

aramkoukia picture aramkoukia  路  3Comments

kylane picture kylane  路  3Comments