Topic: Treeview header link
lede premium asked 5 years ago
Expected behavior On the plain treeview, you can make the header link. On the colourful treeview, because the link surrounds the entire element, you can't make the text within a link
Actual behavior Adding a link to the text within the span doesn't work because it is already within another element
Resources (screenshots, code snippets etc.) https://mdbootstrap.com/plugins/jquery/treeview/
Could we get a version of the animated/colourful treeviews which allow the header to be a link, like the plain version?
Marta Wierzbicka staff answered 5 years ago
Hi,
we will take into consideration your suggestions, thank you for that.
Best, Marta
lede premium commented 5 years ago
I updated to the new version and my treeview reverted to closing when it has the active class so I've had to make the change again. Please can you get it in the next version because it's very inconvenient and it's a really small change to fix it
Marta Wierzbicka staff commented 5 years ago
OK, I'll check this.
lede premium answered 5 years ago
I figured out the active. I think you should standardise these class names. It has active, open and opened on various elements. It should just be .active on all of them.
I also had to alter the js to make it possible to have some treeview elements open on page load.
Lines 3524 and 3537 I changed it to prevent the hiding of nested ul elements set to active from
e.find(".nested")
to
e.find(".nested").not(".active")
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 jQuery
- MDB Version: 4.9.0
- Device: PC
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: Yes