Open kapral18 opened 1 week ago
This has been reported previously: https://github.com/elastic/eui/issues/6488
Unfortunately the answer is still essentially the same: EUI cannot detect any event when buttons are disabled at a React level: https://github.com/facebook/react/issues/9142
https://github.com/elastic/eui/issues/5666 would resolve this issue by not truly disabling buttons, but we don't have an ETA for this work although we do want to do it.
In the interim, one option would be to conditionally wrap your tooltip based on disabled status:
const sometimesDisabledButton = (
<EuiButton disabled={isDisabled}>
Button
</EuiButton>
);
return (
<>
{isDisabled ? (
sometimesDisabledButton
) : (
<EuiToolTip content="Tooltip content">
{sometimesDisabledButton}
</EuiToolTip>
)}
</>
)
Describe the bug If EuiButtonIcon has isLoading that is changing after click on the button the wrapping EuiToolTip stops hiding on blur.
Impact and severity Every single EuiButtonIcon wrapped in EuiToolTip. Specific UI that gets affected is new DataQuality dashboard introduced in 8.16 with new custom action table item index check button icon.
Environment and versions
To Reproduce Steps to reproduce the behavior:
Minimum reproducible example
Minimum reproducible sandbox codesandbox link
Screenshots https://github.com/user-attachments/assets/25a6236b-ccff-4ad3-abc9-f55ba0c926ed (23rd second when clicking away from focused button, tooltip stays)