-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add ability to disable the Empty Page in List #5165
Conversation
@@ -100,7 +100,7 @@ export const ListView: FC<ListViewProps> = props => { | |||
{...sanitizeRestProps(rest)} | |||
> | |||
<Title title={title} defaultTitle={defaultTitle} /> | |||
{shouldRenderEmptyPage | |||
{shouldRenderEmptyPage && empty !== false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not update the shouldRenderEmptyPage
method to use the empty
prop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of Typescript ;)
Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are integration tests (List.spec.js) about the Empty feature, can you add one about the false
value?
Review applied |
Fixes #5158
It's sometimes useful to be able to display an empty list instead of displaying a special "empty page" when there's no data to display.
So, here is a small change that allows to display an empty page when the list is empty.