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(DataTable): don't set unique name for each radio input #14644

Merged
merged 3 commits into from
Sep 14, 2023

Conversation

tw15egan
Copy link
Collaborator

Closes #14268

Fixes an issue that was preventing a user from navigating a Radio selection DataTable with the arrow keys. Since each radio button had a name appended with the row id, it assumed they were all in their own groups. Now, they all get the same name for each table. If a user has multiple radio tables, they would just need to pass in their own name prop to TableSelectRow after the getSelectionProps

Changelog

Changed

  • Removed unique id per row that was being appended to the name

Testing / Reviewing

Go to DataTable --> Selection --> With Radio and ensure you can navigate the DataTable with the arrow keys

@netlify
Copy link

netlify bot commented Sep 12, 2023

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit cb78dc5
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/6500ce87f8ce770008d6efdd
😎 Deploy Preview https://deploy-preview-14644--v11-carbon-react.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.

@netlify
Copy link

netlify bot commented Sep 12, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit cb78dc5
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/6500ce87d9899a0008c2ce39
😎 Deploy Preview https://deploy-preview-14644--carbon-elements.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.

@tw15egan tw15egan force-pushed the data-table-radio-bug branch from 6edf30d to 6a4fdd0 Compare September 12, 2023 20:27
Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

Arrow keys work great 👍

Copy link
Contributor

@guidari guidari left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

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.

[a11y]: DataTable [with-radio-selection] - keyboard nav radio button bug
3 participants