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

feat(FilterableMultiSelect): assign given id to the listbox #16917

Merged
merged 2 commits into from
Jul 26, 2024

Conversation

cuppajoey
Copy link
Contributor

Currently, the FilterableMultiSelect does not assign its id prop to any rendered element making that prop mostly useless for consumers. While it does use the id to create ids for descendant elements; this is inconsistent with MultiSelect which does assign its id prop to the list box container.

This discrepancy can be observed in the Carbon storybook:

✅ MultiSelect ❌ Filterable
storybook-multiselect storybook-filterablemultiselect

Changelog

New

  • Pass the existing id prop to the rendered ListBox for parity with MultiSelect.
  • Add test to coverage assignment of id.

Testing / Reviewing

  • Checkout and build branch
  • Run storybook locally and visit FilterableMultiSelect playground.
  • Inspect DOM element with .cds--multi-select class and confirm id attribute is assigned the given value.

@cuppajoey cuppajoey requested a review from a team as a code owner July 5, 2024 15:33
Copy link
Contributor

github-actions bot commented Jul 5, 2024

All contributors have signed the DCO.
Posted by the DCO Assistant Lite bot.

Copy link

netlify bot commented Jul 5, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

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

Copy link

netlify bot commented Jul 5, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit d67e165
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/669fb5582f1ed4000868e9b7
😎 Deploy Preview https://deploy-preview-16917--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.

Pass the existing `id` prop to the rendered `ListBox` for parity
with `MultiSelect`.
@guidari
Copy link
Contributor

guidari commented Jul 8, 2024

Thanks for the contribution!

@guidari guidari added this pull request to the merge queue Jul 26, 2024
Merged via the queue into carbon-design-system:main with commit d755f2c Jul 26, 2024
22 checks passed
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.

4 participants