Topic: How to to specify which API input you are using

natenoctel free asked 4 years ago

I have an MDB accordion item that has a tooltip on it, when its not collapsed I want the tooltip to be disabled so I added ' isDisabled="true" ' (found at except it just disables the entire item including the button. How can I use that API input to only disable the tooltip?

Here is what the snippet looks like :

<mdb-accordion-item-head mdbTooltip="Numbers" isDisabled="true" placement="right" mdbWavesEffect><mdb-icon fas icon="hashtag" class="fa-1x"></mdb-icon><span [ngClass]="navItemTextStatus">Numbers</span></mdb-accordion-item-head>

Arkadiusz Idzikowski staff answered 4 years ago

It looks like in this case both components use the same input name. We need to fix that on our end, but as a workaround, for now, you can try this solution:

Use ViewChild to get access to the tooltip methods in your component ts file:

@ViewChild(TooltipDirective) tooltip: TooltipDirective;

then update tooltip disabled state programmatically in ngAfterViewInit hook:

  ngAfterViewInit(): void {
    this.tooltip.isDisabled = false;

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 9.3.1
  • Device: Desktop
  • Browser: Chrome
  • OS: OSX
  • Provided sample code: Yes
  • Provided link: Yes