Bug: Tooltips with zero-length tip-slot values are never dis


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

waterandwind pro premium priority asked 2 weeks 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 2 weeks 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 pro premium priority commented a week 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
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Vue
  • MDB Version: MDB5 5.0.0
  • Device: PC
  • Browser: Brave (Chrome)
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes