Replies: 1 comment
-
In my opinion tooltips should not appear in disabled components, but it seems that there is no agreement on how tooltips should work with a disabled component. There is also another possible solution, which is adding a new prop This comment explains pretty well the situeation: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The recently added
DxcTooltip
does not have a specific implementation on how to deal with disabled content.I would like to know if there are any specific scenarios where it would be interesting to have a tooltip in a disabled component. That is not the default behavior with the HTML tooltip but we would have to program some mechanism to prevent it from triggering with our custom tooltip.
In my opinion, the most normal approach would be to conditionally render the tooltip from within the component that triggers the tooltip itself.
This is easier to see in code:
The drawbacks of this solution is that it would lead to repeat this condition for all the components that can be disabled.
Beta Was this translation helpful? Give feedback.
All reactions