Skip to content

In a List, also show the Empty component when no results and only a permanent filter #8320

@christiaanwesterbeek

Description

@christiaanwesterbeek

Is your feature request related to a problem? Please describe.

The filter prop for List is considered a permanent filter. When an empty={<Empty />} prop is supplied to the List with such a permanent filter (and no results), the Empty component will not render. The documentation about it says (emphasis mine).

When there is no result, and there is no active filter, ..., react-admin displays ...

Describe the solution you'd like

Have you considered or will you consider showing the Empty page in this case? The permanent filter is not a user decision, so he should be invited to create a record within the fixed scope of the data.

Describe alternatives you've considered

Alternatively, I could add something underneath the Datagrid that fetches the list context and decide for it's own to show the Empty component...

Additional context

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions