Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to add tooltips on disabled elements in CxJs?

As far as I know, disabled elements don’t have tooltips by default. Is there a way to go around this somehow and add tooltips to them even in this scenario?

P.S. I am working with MenuItem. Do they have some rules that apply to them regarding these tooltips?

I tried something like this:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

<MenuItem
  text="someText"
  onClick="someAction"
  visible-expr="{somethingToEvaluate}"
  disabled-bind="conditionForDisabling"
  tooltip={{
    text: "This is the text for tooltip.",
    visible: expr("{conditionForDisabling}");
}}

but it wasn’t showing up.

>Solution :

Unfortunately, it is not possible to have a tooltip on a disabled element at the moment.
You can get around this by wrapping the element with a span and placing the tooltip on it. You can see the example here.

You can see the example here: Fiddle

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading