Id there a demo of the treeview plugin for vue that shows ho

web
mobile

Topic: Id there a demo of the treeview plugin for vue that shows how to select a node and other basic functions?

Elliott Ward pro premium asked 7 months ago

I was wondering were I might find an example of how to use the treeview plugin to

  1. Select a node
  2. call a link from a nodeitem
  3. and so on...

Magdalena Dembna staff premium answered 7 months ago

Regarding your second question, try changing default tag to <a> and add href attribute like this:

<mdb-treeview-item tag="a" href="#" far icon="bell" title="Offer"/>

Selecting a node might be a little trickier - as the mdbTreeview component wasn't meant to be treated as a select component, you would need to add a handler to a native click event and pass desired value as an argument:

<mdb-treeview-item nested far icon="envelope-open" title="Mail" @click.native="selectItem('Mail')">

Kind regards, Magdalena


Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: Vue
  • MDB Version: 5.8.0
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No