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

State change on data clears the column search input

Open crewtaylor opened this issue 7 years ago • 4 comments

When the state of the data into the table changes the search-by-column fields are cleared. However, the main search bar at the top right of the table does not clear out.

crewtaylor avatar Jun 12 '19 20:06 crewtaylor

@mbrn Hi, has it made to the Master? or even maybe Development branch, I'd like to give it a try. Kinda desperately doing workaround the state to hold the filters value for this couple days.

ardiansyaherwin avatar Aug 01 '19 09:08 ardiansyaherwin

@mbrn Hi, has it made to the Master? or even maybe Development branch, I'd like to give it a try. Kinda desperately doing workaround the state to hold the filters value for this couple days.

Hi @elruinnou you can work on your own repo by forking this. Then you can send a pr if you test it.

mbrn avatar Aug 02 '19 06:08 mbrn

Actually, column filters should not clear. You can use columns in state of your parent component. So column filters will not be cleared when you update data on state.

mbrn avatar Aug 05 '19 05:08 mbrn

@mbrn do you mean by using DefaultFilter in columns? actually that does the trick, but it will lose focus on the active filter. If only there will be any options to set the focus manually.

ardiansyaherwin avatar Aug 05 '19 06:08 ardiansyaherwin