Topic: Bug: Tooltips with zero-length "tip"-slot values are never displayed

waterandwind priority asked 7 months ago


Expected behavior

"Tooltips with zero-length tip slot values are never displayed."

Source: https://mdbootstrap.com/docs/vue/components/tooltips/

Actual behavior

This code

<MDBTooltip v-model='showTooltip'>

  <template #reference>
    <MDBBtn>Geruch</MDBBtn>
  </template>

  <template #tip></template>
</MDBTooltip>

causes a small box that is displayed even if the tip length is zero.

Resources (screenshots, code snippets etc.)

enter image description here


Bartosz Cylwik staff answered 7 months ago


Hi! What is the use case for an empty #tip template? Adding some content dynamicaly later?

You can try to toggle display styles for the tooltip when it should not be visible. I have prepared some basic demo for that here:

https://mdbootstrap.com/snippets/vue/b-cylwik/6076087#js-tab-view


waterandwind priority commented 6 months ago

Correct, there is content that is added dynamically later. Thanks for the snippet, very kind of you. Marked as complete.



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Vue
  • MDB Version: MDB5 5.0.0
  • Device: PC
  • Browser: Brave (Chrome)
  • OS: Windows 10
  • Provided sample code: Yes
  • Provided link: Yes