react-bootstrap-table2 icon indicating copy to clipboard operation
react-bootstrap-table2 copied to clipboard

onFilter filters an array of values

Open F-Adam-B opened this issue 4 years ago • 2 comments

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.

Screen Shot 2021-02-08 at 4 56 26 PM

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?

F-Adam-B avatar Feb 09 '21 00:02 F-Adam-B

Hey @F-Adam-B , I'm trying to do the same thing. Did you happen to find a solution for this?

anushmadubey avatar Mar 08 '21 03:03 anushmadubey

any update on this issue?

gioviopantat avatar Jun 15 '22 12:06 gioviopantat