0

We are using lightning-combobox (in lwc) to display a dynamic dropdown list. We are adding just the standard 2 attributes per option i.e label and value. When a user hovers on any of the options, then the label is displayed as the hover text. Is there a way to customize that hover text? I tried adding "title" as an attribute to the option, but that did not have any effect.

enter image description here

2
1

Out of the box, this is not possible as of today as this is not exposed for component consumers to override this behavior.

However, if you want this functionality I would look into the source code that's available here.

There is a hierarchy below of components forming this component.

combobox
  baseCombobox
    baseComboboxItem
      baseComboboxFormattedText

All you will need to do is modify the component to make sure the title is passed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.