1

Is it possible to disable specific options of a lightning-combobox like one can do with the attribute disabled of the option element in standard html (example below)

<select>
    <option>1</option>
    <option disabled>2</option>
    <option>3</option>
</select>
1
  • From the documentation it does not look like SF has that feature. You have to make your own component to support this use case Commented Jun 5, 2022 at 19:13

2 Answers 2

1

No, it's not possible if you want to use base lightning-combobox component.

Possible workarounds: (ordered by complexity)

0

As possible solution you can use a lightning-button-menu here enter image description here As it has the disabled attribute!

enter image description here

And you can use it like a lightning-combobox, it will just appear a little different.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .