feat: show empty page when only permanent filters are applied#11123
Closed
AarishMansur wants to merge 3 commits intomarmelab:nextfrom
Closed
feat: show empty page when only permanent filters are applied#11123AarishMansur wants to merge 3 commits intomarmelab:nextfrom
AarishMansur wants to merge 3 commits intomarmelab:nextfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
When a List is rendered with a permanent filter via the
filterprop and the query returns no records, theemptycomponent is not displayed.This happens because permanent filters are currently treated the same as user-applied filters when deciding whether to render the empty page, even though permanent filters are not a user choice.
Solution
Forward the permanent
filterprop fromListtoListViewand use it to distinguish permanent filters from user-applied filters when computing the empty state.The empty page is now rendered when:
Permanent filters no longer prevent the empty page from being displayed, while user-applied filters continue to behave as before.
How To Test
Listwith a permanent filter using thefilterprop and anemptycomponent.A unit test has been added to cover this scenario.
Additional Checks
nextfor a feature