bootstrap-treeview | Tree View for Twitter Bootstrap | Dataset library
kandi X-RAY | bootstrap-treeview Summary
kandi X-RAY | bootstrap-treeview Summary
Tree View for Twitter Bootstrap -
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of bootstrap-treeview
bootstrap-treeview Key Features
bootstrap-treeview Examples and Code Snippets
Community Discussions
Trending Discussions on bootstrap-treeview
QUESTION
i am totally confused with sorting treedata and displaying with bootstrap-treedata.js (https://github.com/jonmiles/bootstrap-treeview). since i am new here, ich hope my question fits in here - i did´nt found any solutions or helpful reference somewhere else.
my raw data looks like:
id: 1, name: Node_1, parent_id: 0, sort: 3
id: 12, name: Child_of_Node_1, parent_id: 1, sort: 2
id: 323, name: Node_2, parent_id: 0, sort: 1
id: 4352, name: Child_of_Node_2, parent_id: 323, sort: 5
id: 7256, name: Child_of_Child_of_Node_1, parent_id: 12, sort: 3
...and so on.
populating on the website works fine. Any efforts to sort the data upfront (seperately by Level according to the field ‚sort’) fails. it will always be displayed sorted by 'id' asc.
Are there any suggestions if I have to use an other library (instead of bootstrap-treeview.js) or if I have to sort the HTML-Output while displaying the website? Or even if the raw data could somehow be sorted successfully upfront?
Thanks folks!
...ANSWER
Answered 2021-Jun-05 at 20:54Finally I found out myself, just in case this helps someone: the treedata can be sorted with the database query. In my case, and I assume this could also work on other libs displaying treedata, it was vital to sort the data of all nodes. Sorting only the top node hadn‘t helped.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install bootstrap-treeview
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page