Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add <Datagrid empty> prop to display column headers even on empty lists #6164

Merged

Conversation

andrico1234
Copy link
Contributor

@andrico1234 andrico1234 commented Apr 13, 2021

Implements @fzaninotto suggestion from here

Adds empty component to Datagrid so we can display a custom component if there are no records to render.

Example

<Datagrid empty={<div>No records to show</div>} hasBulkActions>
  <TitleField />
</Datagrid>

@fzaninotto fzaninotto merged commit d8d4ced into marmelab:next Apr 13, 2021
@fzaninotto
Copy link
Member

Thanks!

@fzaninotto fzaninotto added this to the 3.15 milestone Apr 13, 2021
@fzaninotto fzaninotto changed the title Feature: Add empty Datagrid component Add <Datagrid empty> prop to display column headers even on empty lists Apr 13, 2021
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.

2 participants