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(react): update table header unique id to use stable id #7730

Merged
merged 2 commits into from
Feb 5, 2021

Conversation

joshblack
Copy link
Contributor

@joshblack joshblack commented Feb 3, 2021

Closes #7721

Updates TableHeader to leverage useId versus Math.random for an internal unique id. While this doesn't prevent all randomness, there is a deterministic order that should make it easier for teams that use snapshot testing to snapshot components that contain TableHeader.

Changelog

New

Changed

  • Update TableHeader to use useId versus Math.random

Removed

Testing / Reviewing

  • Verify that the column headers in data table have the correct ids generated and applied

@netlify
Copy link

netlify bot commented Feb 3, 2021

Deploy preview for carbon-elements ready!

Built with commit be8b33c

https://deploy-preview-7730--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Feb 3, 2021

Deploy preview for carbon-components-react ready!

Built without sensitive environment variables with commit be8b33c

https://deploy-preview-7730--carbon-components-react.netlify.app

Copy link
Collaborator

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 ✅

@kodiakhq kodiakhq bot merged commit 47665bd into carbon-design-system:master Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is uniqueId in TableHeader for aria-describedby and id necessary?
3 participants