Skip to content

fix: TableBody component should respect isLoading state and not attempt to render empty state fallback during initial loading #1407

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

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from

Conversation

YOOJS1205
Copy link

@YOOJS1205 YOOJS1205 commented Apr 16, 2025

When isLoading is true, the table still attempts to access and render data properties, which can cause type errors. The table should not try to access or render any data during the initial loading state, and should only show the loading overlay.

Currently, the MRT_TableBody component only checks for empty rows (!rows.length) but doesn't consider the isLoading state. This causes two issues:

Type errors when accessing data properties during loading
Unwanted empty state fallback being rendered behind the loading overlay

Please check #1368

…pt to render empty state fallback during initial loading
Copy link

vercel bot commented Apr 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
material-react-table ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 16, 2025 1:00pm
material-react-table-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 16, 2025 1:00pm

@YOOJS1205
Copy link
Author

@KevinVandy Could you please review my PR and Github Issues?

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.

1 participant