Skip to content

feat: show empty page when only permanent filters are applied#11123

Closed
AarishMansur wants to merge 3 commits intomarmelab:nextfrom
AarishMansur:feat-list-empty-permanent-filter
Closed

feat: show empty page when only permanent filters are applied#11123
AarishMansur wants to merge 3 commits intomarmelab:nextfrom
AarishMansur:feat-list-empty-permanent-filter

Conversation

@AarishMansur
Copy link
Copy Markdown
Contributor

Problem

When a List is rendered with a permanent filter via the filter prop and the query returns no records, the empty component 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 filter prop from List to ListView and use it to distinguish permanent filters from user-applied filters when computing the empty state.

The empty page is now rendered when:

  • the list has no results, and
  • no user-applied filters are active

Permanent filters no longer prevent the empty page from being displayed, while user-applied filters continue to behave as before.

How To Test

  1. Render a List with a permanent filter using the filter prop and an empty component.
  2. Ensure the data provider returns no records for that filter.
  3. Verify that the empty page is displayed.
  4. Apply a user filter via the filter inputs.
  5. Verify that the empty page is no longer displayed.

A unit test has been added to cover this scenario.

Additional Checks

  • The PR targets next for a feature
  • The PR includes unit tests
  • The PR includes one or several stories (not applicable)
  • The documentation is up to date (not required for this behavior change)

@AarishMansur AarishMansur deleted the feat-list-empty-permanent-filter branch January 18, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant