Date column filtering in PUI #7806
Replies: 2 comments 1 reply
-
@martonmiklos great question. Adding a date filter to the new interface is definitely something that we need to do. Currently, you can filter by "boolean" (true / false) or by specified choices. A "date" filter needs to be added! The way we do filtering for tables is currently handled in the "drawer" which slides out from the right. We have a set of "key:value" filters which match the filter names made available from the backend. However, my plan has been to also allow filtering directly from a column, as per your link - https://icflorescu.github.io/mantine-datatable/examples/searching-and-filtering/ This would link in with our existing filtering scheme - i.e. you can click on a column header to add a filter specific to that column (if a filter is supported for that column). However, this has not been implemented yet. Requires a bit of work. For reference, filtering code in PUI is currently handled here:
And a hook for dynamically generating a list of "options" for a given filter, via an API call: https://github.com/inventree/InvenTree/blob/master/src/frontend/src/hooks/UseFilter.tsx |
Beta Was this translation helpful? Give feedback.
-
@martonmiklos part of the work for this has now been implemented - #8299 The ability to select a "date" for table filtering against a specific column now works. Still need to add "filters" by directly selecting a particular column |
Beta Was this translation helpful? Give feedback.
-
Hi @matmair , @SchrodingersGat
I am poking around the #821 and would like to add a a filter by date to the table column. I have not found such an implementation yet.
Do you have any guidance/hints how to implement it?
I looked around the mantine-datatable filtering docs here:
https://icflorescu.github.io/mantine-datatable/examples/searching-and-filtering/
However this implements the filtering right into the header. I have not seen using such an approach in the PUI (if I am not mistaken). I think there is a reason why this feature have not been used and I guess you would like to stick into this approach.
Beta Was this translation helpful? Give feedback.
All reactions