glittershark / reactable

Fast, flexible, and simple data tables in React
glittershark.github.io/reactable
MIT License
1.51k stars 222 forks source link

Adding the ability to use complex forms in filters #385

Open futuraprime opened 7 years ago

futuraprime commented 7 years ago

This change allows the user to put more complex formatting into the table (e.g. React components) and still filter the table based on those rows.

Currently, while the custom sort functions are fed the raw contents of each cell (& so get react components directly if they're being used), the filter functions get a stringified version, meaning everything gets filtered against [object Object], which is not especially useful. This tries to preserve all current use cases, but in the event that toString() returns [object Object], it sends the object (presumably a React component, though it could be something complex within the data array.)