Clear Filters Button
There is some method actually to enable a clear filters button? Must be near or download the ACTIONS header column, something licke CLEAR
No. There should be. But there's none. Potentially you could add one by overriding TableFilterRow component.
PS All caps is interpreted as shouting. So why do you shout at us?
No. There should be. But there's none. Potentially you could add one by overriding
TableFilterRowcomponent.PS All caps is interpreted as shouting. So why do you shout at us?
My apologies; i did modify the title.
How i can use MTableFilterRow to clear the bottom, i try to forceUpload all the component table, reset the state, etc, but nothing works.
There's no clear filters button, but you can still clear filters using methods by accessing the tableRef object and manually them out. For example:
let self = this.tableRef.current; // get the tableRef
let query = self.state.query; // get the query obj
self.setState({
...self.dataManager.getRenderState(), // set the render state
query: {
...query,
filters: [] // set filters to nothing
}
});
// you also need to update the filter value on the column by doing this:
for ( var item in this.tableRef.current.state.query.filters ) {
let tableColumn = this.tableRef.current.state.query.filters[item].column
this.tableRef.current.dataManager.changeFilterValue(tableColumn.tableData.id, null)
}
I don't think this is really "recommended", though, but this is how I was able to solve this problem for myself.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.