React - How to dynamically disable a single item inside of Carbon Dropdown component #7780
-
Hello. I am trying to dynamically disable a single item inside of the Carbon Dropdown component in React. What would be the best approach? I have noticed in the carbon storybook that there is a disable property but it seems to only disable the entire dropdown. I have also tried putting the items inside of an array, giving the item I want disabled the disable=true property and then passing it to the Dropdown component but that did not work. Thanks for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey there @dhebert-dev, it doesn't seem like disabling an individual item is currently supported (Rel #6477). As a workaround, you can use the |
Beta Was this translation helpful? Give feedback.
Hey there @dhebert-dev, it doesn't seem like disabling an individual item is currently supported (Rel #6477). As a workaround, you can use the
Select
element, which allows disabling a specificSelectItem