react-bootstrap-table2
react-bootstrap-table2 copied to clipboard
onFilter filters an array of values
This may already be implemented, but I can't figure out a solution. I have created a custom filter that renders an overlay of checkboxes where a user can select/deselect any of the unique values from that column.
Here is my columns object
const columns = Object.keys(headerTypes).map((header) => { return { filter: customFilter({ comparator: Comparator.EQ }), filterRenderer: (onFilter, column) => this.renderCustomFilter(onFilter, column), dataField: header, text: header, // sort: true, headerStyle: { width: '200px' }, }; });
I've got the table to filter by calling onFilter and passing the value from the event object, but only one checked value at a time. If I check more than one value, the table goes blank.
Is there a way to filter an array of values, an array of values that the user has checked, and vice versa when the user unchecks a checkbox?
Hey @F-Adam-B , I'm trying to do the same thing. Did you happen to find a solution for this?
any update on this issue?