Open smee opened 7 years ago
Thanks for the pull request.
In my original implementation of DataTable I used to have search embedded into DataTable itself (it used to build an index based on data provided during initialization). What I didn't like about it is that if underlying data is changed somehow (new dataset is arriving from server) DataTable has to rebuild index, reapply filters, etc.
My current idea is that filter capabilities should be separated from table view capabilites. "Search" component should be able to index it on it's own and expose a subscription with applied search that DataTable can use as a seed subscription. In this case "Search" component can be used with other collection representation components (lists, trees, etc.)
Let me work on the example of standalone search that "feeds" datatable data. I'll likely have time to work on it during the upcoming weekend
Sure, thanks.
@kishanov Thanks for implementing this. Following up on your last comment here - have you been able to spend any time putting that search example together?
@ChrisHacker yes, I have a working solution, but it is used in our private codebase and cannot be extracted easily (it has some of our product-specific logic in it). I don't have an estimate when I'll have time to work on generic example :(
This pull request is not production ready, but rather an invitation for discussion.
I needed a way to introduce filterable columns. I started working on four types of filters:
We still need a way to allow users to add new filter types (dates, timestamps, durations,...) as well as a way to completely replace the filter components (just like pagination).
There is also a distinct lack of documentation/demo code, will be added upon further refinement of the main ideas.
What do you think?