DT
DT copied to clipboard
Excel like filtering
I prefer to use datatable for my Shiny projects to show data faster. In my opinion, DT package is the best option if you need speed. On the other hand, the filtering method on datatable is so primitive and useless. I wonder, is there chance to implement excel-like filtering on datatables.
It would be great, if there was a filter for each data types (For example, numeric/date column:["equal", "greater", "greater than", ...], string column: ["contain", "startswith", ...] )
I found some examples of advanced menu filter (like Excel) below:
- DataTable: excel-like filters: https://github.com/primefaces/primefaces/issues/12727
- Kendo UI: http://demos.telerik.com/kendo-ui/grid/filter-menu-customization
Is there a way to implement excel-like filtering with R Shiny and Datatable?
Thanks!
Images from the links I shared above:


R's DT library provides a way to access the DataTables javascript library. Anything that's not covered there is probably not going to end up in DT, and I don't think advanced excel-like filtering is present in DataTables. I'm not a DT developer though and will let others comment.
Also, calling something "primitive and useless" before asking for a feature is probably not going to predispose devs to work on said feature.
I think the SearchBuilder extension does what you want:
- https://github.com/rstudio/DT/pull/881
- https://github.com/rstudio/DT/pull/1113