Provide settings to control multifilter initial selection #3905
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this? (check all applicable)
Description
Back in #608 there was a hidden feature to pre-select all entries in a multi-filter, which got removed when migrating the filters to react. I heavily depend on this and would like to see it come back. I think it would make sense to fix this in a less hacky way, using column metadata.
In below screenshot, the priority and status columns are multi-filters, therefore they have an extra dropdown to select one of "first", "all", or "none". Selecting "first" uses the current behavior to select the first value, "all" and "none" are self-explanatory.
To-Do
Discussion items
I'm not particularly happy about how
setFilterDefaults
runs after the filters are gathered in the query result service and after the options are retrieved. Changing this may require some refactoring, but before I start with that I'd like to get some feedbackThe second thing that will require some discussion, how to do dashboard level filters. These don't have access to a specific visualization, so if two visualizations have different defaults for the default state for a multi-filter column then there is a conflict. Also, it doesn't seem like the specific visualizations are available at the time the filters are determined, similar to the first discussion point.
Looking forward to your thoughts.
Related Tickets & Documents
TBD
Mobile & Desktop Screenshots/Recordings (if there are UI changes)