carbon-design-system / ibm-products

A Carbon-powered React component library for IBM Products
https://carbon-for-ibm-products.netlify.app/
Apache License 2.0
84 stars 118 forks source link

fix(Datagrid): show column headers for empty infinite scroll #5254

Closed matthewgallo closed 1 day ago

matthewgallo commented 2 weeks ago

Closes #5240

This PR displays the column headers for empty virtualized/infinite scroll Datagrids. The column headers typically are rendered as part of <DatagridVirtualBody /> because there is special sizing that is required but when there is no data this presents a problem because the headers are not displayed. This renders them normally if we have a withVirtualScroll Datagrid that is empty.

What did you change?

packages/ibm-products-styles/src/__tests__/__snapshots__/styles.test.js.snap
packages/ibm-products-styles/src/components/Datagrid/styles/_datagrid.scss
packages/ibm-products/src/components/Datagrid/Datagrid/DatagridContent.js

How did you test and verify your work?

Storybook

netlify[bot] commented 2 weeks ago

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

Name Link
Latest commit 9be5f397eff11e790922941aafcb84492cc87030
Latest deploy log https://app.netlify.com/sites/carbon-for-ibm-products/deploys/66464cc17ffaa000081c3325
Deploy Preview https://deploy-preview-5254--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.