Skip to content

feat(listbox): support disabled items in combobox, dropdown, filterablemultiselect#9913

Merged
kodiakhq[bot] merged 9 commits into
carbon-design-system:mainfrom
tay1orjones:6477-disable-combobox-dropdown-items
Oct 22, 2021
Merged

feat(listbox): support disabled items in combobox, dropdown, filterablemultiselect#9913
kodiakhq[bot] merged 9 commits into
carbon-design-system:mainfrom
tay1orjones:6477-disable-combobox-dropdown-items

Conversation

@tay1orjones

Copy link
Copy Markdown
Member

Closes #6477

Refs #9859, #9610, #7772, #7780

Adds support for disabling individual items inside ComboBox, Dropdown, and FilterableMultiSelect.

Changelog

Changed

  • combobox, dropdown, filterablemultiselect: enable disabled items prop through downshift, update stories/docs/styles

Testing / Reviewing

View each of the stories for these components. They have been updated to have a single disabled item for testing purposes.

@tay1orjones tay1orjones requested a review from a team as a code owner October 20, 2021 20:57
Comment thread packages/react/src/components/Dropdown/Dropdown.js Outdated
@netlify

netlify Bot commented Oct 20, 2021

Copy link
Copy Markdown

✔️ Deploy Preview for carbon-react-next ready!

🔨 Explore the source changes: 9e4ce0d

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/6172df20c9ab020007875efd

😎 Browse the preview: https://deploy-preview-9913--carbon-react-next.netlify.app

@netlify

netlify Bot commented Oct 20, 2021

Copy link
Copy Markdown

✔️ Deploy Preview for carbon-elements ready!

🔨 Explore the source changes: 9e4ce0d

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/6172df20c9ab020007875ef9

😎 Browse the preview: https://deploy-preview-9913--carbon-elements.netlify.app

@netlify

netlify Bot commented Oct 20, 2021

Copy link
Copy Markdown

✔️ Deploy Preview for carbon-components-react ready!
Built without sensitive environment variables

🔨 Explore the source changes: 9e4ce0d

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/6172df203a447600074cdaef

😎 Browse the preview: https://deploy-preview-9913--carbon-components-react.netlify.app

@dakahn

dakahn commented Oct 20, 2021

Copy link
Copy Markdown
Contributor

Been thinking about this more -- we might want to use a pattern we've used elsewhere and have the disabled items not actually be disabled="true" but be disabled functionally and stylistically instead.

That way they're still able to be focused and communicate their state to the user via screen reader or whatever
that might also help with the downshift weirdness where last non-disabled hoverable item is selected if enter is pressed while hovering on a disabled item

@kodiakhq kodiakhq Bot merged commit 7a1e883 into carbon-design-system:main Oct 22, 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.

ListBox: need a way to disable a single listbox item in a dropdown, combobox, or multiselect

3 participants