Topic: Id there a demo of the treeview plugin for vue that shows how to select a node and other basic functions?
Elliott Ward premium asked 5 years ago
I was wondering were I might find an example of how to use the treeview plugin to
- Select a node
- call a link from a nodeitem
- and so on...
Magdalena Dembna staff answered 5 years 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
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Premium
- Premium support: Yes
- Technology: MDB Vue
- MDB Version: 5.8.0
- Device: Desktop
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No