Topic: side-nav-2 with Tooltips out of Data from Backend

almato free asked 1 year ago


Hello

Is there a way to get ToolTips out of the data from the Backend?

Expected behavior mdb-tooltip included in Data Array

Actual behavior no hint in documentation

best regards

Resources (screenshots, code snippets etc.)

 <mdb-side-nav-2 v-model="show" color="black" over :sidenav-class="['sidenav-content']"
    :data="content" @itemClick="selectItem"  >


 content: Array[1]
  name: menu1
  ???: ToolTip to menue1

Bartosz Cylwik staff answered 1 year ago


Hi, to use tooltip in a mdb-side-nav-2, you would have to use the custom content slot like in a example bellow

https://mdbootstrap.com/docs/b4/vue/navigation/sidenav/#custom - docshttps://vue.mdbootstrap.com/#/navigation/pro/sidenav2/ - preview (scroll to Custom slim with tooltips)

You can create your custom array with data (named custom in that example) and add it inside v-for loop. (in that example, change show6 to show inside the mdb-tooltip component)

Best Regards!


Bartosz Cylwik staff answered 1 year ago


Hi, if you want your tooltip message to be reactive you can use the data function for that. Please check the snippet below

https://mdbootstrap.com/snippets/vue/b-cylwik/4845562

Let me know if that answers your question. Best Regards!


almato free commented 1 year ago

HI this works for an single Element but i use a Side-Nav-2 which get his Structure from a Rest-Call ( data in content )



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: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: MDB4 6.7.3
  • Device: not relevant
  • Browser: chrome
  • OS: windows 10
  • Provided sample code: No
  • Provided link: No