Skip to content

ListGuesser's custom empty element not shown when no filters and no data#672

Open
PawelSuwinski wants to merge 7 commits into
api-platform:mainfrom
PawelSuwinski:ListGuesser-listEmpty
Open

ListGuesser's custom empty element not shown when no filters and no data#672
PawelSuwinski wants to merge 7 commits into
api-platform:mainfrom
PawelSuwinski:ListGuesser-listEmpty

Conversation

@PawelSuwinski
Copy link
Copy Markdown
Contributor

A custom empty state element passed to ListGuesser is ignored in the common “no filters, no results” case. ListGuesser forwards the empty prop only to Datagrid, not to List, and the Datagrid (and its empty prop) is never mounted in such case. It only appears when filters are applied, because then List keeps the list layout and Datagrid handles the empty state.

So to fix it there is a need to forward also a List's empty prop and for example set it to false or just using empty only on the List level.

@PawelSuwinski PawelSuwinski changed the title ListGuesser empty state not shown when the list has no filters and no data ListGuesser custom empty state element not shown when the list has no filters and no data May 25, 2026
@PawelSuwinski PawelSuwinski changed the title ListGuesser custom empty state element not shown when the list has no filters and no data ListGuesser's custom empty state element not shown when no filters and no data May 25, 2026
@PawelSuwinski PawelSuwinski changed the title ListGuesser's custom empty state element not shown when no filters and no data ListGuesser's custom empty element not shown when no filters and no data May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant