[Bug]: DataTableSkeleton not matching all forms of DataTable
pekeler opened this issue · comments
Package
@carbon/react
Browser
Chrome
Package version
latest Carbon Svelte
Description
A DataTable can be used without a title, but the Skeleton always assumes that a title is part of the layout. This is causing an unfortunate vertical shift for the viewer when transitioning from Skeleton to DataTable. Setting showToolbar to false is not a fine enough setting.
Screenshots
DTSkeleton.mov
Steps to reproduce
Show skeleton while data is slowly loading, then switch to DataTable.
Code of Conduct
- I agree to follow this project's Code of Conduct
- I checked the current issues for duplicate problems
If the DataTable was structured such that the skeleton just replaced the table's body, it would solve this problem but also enable use cases such as allowing the user to use the search or press a toolbar button while the data is loading (something we should allow users in a modern SPA).
Hi @pekeler
So it's hard to predict what information is in the data table, so the skeleton would often not match the exact data in that data table. The skeleton state can't be aware of the data table format. However, you can customize the skeleton to match the data if you know what it'll be.
We don't recommend this and it's not the purpose of the skeleton state.