ludo / jquery-treetable

jQuery plugin to show a tree structure in a table
http://ludo.cubicphuse.nl/jquery-treetable
GNU General Public License v2.0
739 stars 278 forks source link

Allow treetable for unsorted html #202

Open rulrok opened 7 years ago

rulrok commented 7 years ago

This PR changes the plugin to allow treetable to correctly initialize a table if the HTML is not sorted properly.

ludo commented 7 years ago

Nice 👍 Do you think you could make this behavior optional? If the nodes are already ordered it would be an unnecessary performance hit to do this, right?

rulrok commented 7 years ago

Oh sure, I will update that and report back here.

rulrok commented 7 years ago

@ludo I had to autoindent the file first. My editor just refused to save the file without doing it. I made it on a separate commit to avoid confusion. I've added one setting which defaults to false. See if it is enough. Don't forget to update the documentation on the website if everything if alright :)