Skip to content

Fix Datagrid empty throws error when used in standalone mode#10812

Merged
djhi merged 2 commits intomasterfrom
fix-datagrid-empty-standalone
Jul 2, 2025
Merged

Fix Datagrid empty throws error when used in standalone mode#10812
djhi merged 2 commits intomasterfrom
fix-datagrid-empty-standalone

Conversation

@fzaninotto
Copy link
Member

Closes #10811

}

return null;
return empty ?? <ListNoResults resource={resource} />;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If empty is null or false, it shouldn't return a default component. Only when it is undefined

hasBulkActions={hasBulkActions}
loading={loading}
empty={empty}
empty={empty ?? <ListNoResults resource={resourceFromContext} />}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

@djhi djhi added this to the 5.9.1 milestone Jul 2, 2025
@djhi djhi merged commit 7554638 into master Jul 2, 2025
15 checks passed
@djhi djhi deleted the fix-datagrid-empty-standalone branch July 2, 2025 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RFR Ready For Review

Development

Successfully merging this pull request may close these issues.

Enhance Datagrid to Autodetect Resource from useList

2 participants