Salesforce -
I have a standard lightning button on the salesforce page. There are some conditions to show the button and to disable it. When the condition doesn't satisfy then I need to disable the button and when we hover on that disabled button, we should be able to see some text. I am using lightning web components.
HTML:
<template if:true={disableButton}>
<lightning-button icon-name="utility:custom_apps" label="button" icon-position="left"
onClick={doSomething} title="button is disabled" disabled></lightning-button>
</template>
Js code:
if (conditionNotSatisfied=== true){
this.disableButton = true;
}
The functionality of disabling the button is working but when I hover over the disabled button, the text is not displayed.
Can someone help me with a suggestion on how to display the text on the disable button when I hover on it?