Bootstrap Treeview
github.com
github.com
I find it amusing how things have changed. We've almost come full circle.
https://pbs.twimg.com/media/ENnKCr2U8AAw4Bf?format=jpg&name=...
https://codepen.io/dsheiko/pen/MvEpXm
This is a bit fancier than necessary and that makes it not so good as an example for learning, but hopefully it will be enough to give you the idea.
edit: this one is a little bit better to understand the basics: https://medium.com/metaphorical-web/javascript-treeview-cont...
In short, summary/detail has the native hability to collapse the details and you can explore that to implement a tree by nesting them.
https://css-tricks.com/quick-reminder-that-details-summary-i...
For anyone interested in rolling their own, nested UL/OL's and jQuery's slideToggle will get you most of the way there but with better accessibility.
And this will save me from writing tests for those lines. With all major browsers. And documentation. And maintain all that, of course, for the next 5 years.
And when new devs will arrive in the team to provide the training for the custom code. I may even not be here anymore
So yes, it can be overkill, or just what you need.
E.G: some server side dev need a quick fix for his personal web site.
Besides, even a lib with zero tests like this one will have enough users and tickets open that it will be better tested that the server side dev code that don't know JS much.
Your comment reflects exactly the kind of attitude that puts people off doing open source work. No one is forcing you to use this project, someone put effort into making this and released it to the world for free, what does your criticism add?
You're totally right, but everyone should just ignore the idiot troll and move on.
Is that true if you are using it as part of a react or vue application? I know, for example, that bootstrap-vue replaces the jquery dependency with Vuejs[1]. I'd guess the react equivalent is similar.
to your point, of course its not advisable to introduce bootstrap and jquery to your project just because you want to implement a treeview