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

[Feature Request]: Combo-box - option to remove the clear icon #9895

Closed
1 task done
cedricpelle opened this issue Jan 4, 2023 · 1 comment
Closed
1 task done

[Feature Request]: Combo-box - option to remove the clear icon #9895

cedricpelle opened this issue Jan 4, 2023 · 1 comment

Comments

@cedricpelle
Copy link

The problem

Into the combo-box (https://web-components.carbondesignsystem.com/?path=/docs/components-combo-box--default), i would like an option to remove the clear icon, to force the user to select always an option.
Like into the dropbox ( but dropbox does not allow to search , so user need to scroll into the list).

The solution

I used this to test :
document.querySelector('#my-combo-box').shadowRoot.querySelector('#selection-button').style.display = "none";

But the shadowRoot need to be initialized ( and we don't have control on that ) so i could not use the document.querySelector('#my-combo-box').shadowRoot.querySelector('#selection-button').style.display = "none"; as i am not sure that the shadowRoot will be available.

Examples

No response

Application/PAL

No response

Business priority

High Priority = pressing release

Available extra resources

No response

Code of Conduct

@kennylam kennylam transferred this issue from carbon-design-system/carbon Jan 10, 2023
@kennylam kennylam self-assigned this Jan 10, 2023
@kennylam
Copy link
Member

@cedricpelle wouldn't making the combo box required achieve what you are looking for?

@kennylam kennylam closed this as completed Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants