Topic: treeview adding data-mdb-open-on-click="false" still activates link
Yiannis Kyriazidis free asked 1 year ago
In treeview when using data-mdb-open-on-click="false"
then clicking on icon with href still activates the link , even though it should'nt
See example below. Click on node Three.
It would be closer if we could do the opposite of the demo . So use the attribute but when user clicks in the close/open icon it would cancel the click event and just toggle the treenode. Can this be done in the event handler ? so that the icon click does not trigger the anchor href click event ?
Because when I click on it (the label) I want to call a specific url , just like any other treenode. But I also want to expand it when clicking on the icon.
Think of a documentation system, I have a book that has chapters and each chapter can have pages. When I click on chapter treenode I want to call a url to show a description of the chapter . But I also want to expand a chapter to show the underlying pages in treeview.
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Free
- Premium support: No
- Technology: MDB Standard
- MDB Version: MDB5 3.10.1
- Device: windows desktop
- Browser: chrome
- OS: windows
- Provided sample code: No
- Provided link: Yes