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

fix(Datagrid): show skeleton body for fetching and global filter state #5720

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

matthewgallo
Copy link
Member

Closes #5659

This PR adds a skeleton body to render if the Datagrid is in a fetching state and there is a global filter provided as well. react-table forces the rows property to be an empty array when isFetching is true and if initialState.globalFilter contains a value, our current implementation shows nothing in this scenario, instead we'll now show loading skeletons.

What did you change?

packages/ibm-products-styles/src/components/Datagrid/styles/_datagrid.scss
packages/ibm-products/src/components/Datagrid/Datagrid/DatagridBody.tsx
packages/ibm-products/src/components/Datagrid/Datagrid/DatagridContent.tsx
packages/ibm-products/src/components/Datagrid/Datagrid/DatagridSkeletonBody.tsx
packages/ibm-products/src/components/Datagrid/types/index.ts

How did you test and verify your work?

Storybook, temporarily updated Selectable rows story to reproduce behavior

@matthewgallo matthewgallo requested a review from a team as a code owner July 24, 2024 19:43
@matthewgallo matthewgallo requested review from kennylam and annawen1 and removed request for a team July 24, 2024 19:43
Copy link

netlify bot commented Jul 24, 2024

Deploy Preview for carbon-for-ibm-products ready!

Name Link
🔨 Latest commit 2d0a669
🔍 Latest deploy log https://app.netlify.com/sites/carbon-for-ibm-products/deploys/66a159623dc91600087de57d
😎 Deploy Preview https://deploy-preview-5720--carbon-for-ibm-products.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants