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

React components - Datatable Skeleton show key value in the header #8719

Closed
1 of 2 tasks
Kilian-Collender opened this issue May 19, 2021 · 0 comments · Fixed by #8721
Closed
1 of 2 tasks

React components - Datatable Skeleton show key value in the header #8719

Kilian-Collender opened this issue May 19, 2021 · 0 comments · Fixed by #8721

Comments

@Kilian-Collender
Copy link
Contributor

When using the React carbon component the Datatable skeleton doesn't show the expected header values.

image

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

Describe in detail the issue you're having.

If the skeleton is passed the headers parameter with the same format as the normal datatable, the key names are shown in the header, rather than the expected header value.

Is this issue related to a specific component?

Datatable skeleton

https://react.carbondesignsystem.com/?path=/docs/components-datatable--skeleton

What did you expect to happen? What happened instead? What would you like to
see changed?

I expect it to handle the same format as the normal datatable and display the header value from the headers object.

Here is an example from the datatable tests
https://github.com/carbon-design-system/carbon/blob/main/packages/react/src/components/DataTable/__tests__/DataTable-test.js#L69-L77

What browser are you working in?

FF && Chrome

What version of the Carbon Design System are you using?

"carbon-components": "10.32.1"
"carbon-components-react": "7.32.1"

What offering/product do you work on? Any pressing ship or release dates we
should be aware of?

IBM Cp4Waiops, continuous release cycle.

Steps to reproduce the issue

Here is an example
https://codesandbox.io/s/datatable-skeleton-header-defect-t4rkf?file=/src/index.js:191-347

Additional information

I believe this is the issue:
https://github.com/carbon-design-system/carbon/blame/main/packages/react/src/components/DataTableSkeleton/DataTableSkeleton.js#L73

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

Successfully merging a pull request may close this issue.

2 participants