Closed kotmatpockuh closed 9 years ago
Why dont you sort data...before binding it to tree_data or tree_rows
what would be in case if data will be updated on-the-fly when data is displayed?
The directive wasnt develop to handle update on the fly. you can use watcher. If you figure that out, will appreciate if you contribute
I need this functionality too. I don't promise anything, but in the next weeks I will try to add this feature.
To clarify, what you are asking for is:
And the tree data will be sorted by that column, with the specified sort order (asc or desc) for all tree levels, as:
Example of an asc sort order if the column was clicked:
a
1
i
ii
2
3
b
+1
Sorting of columns now added in the latest pull request
Hi.
Seems that there is some stange behaviour with sorting:
<tr ng-repeat=\"row in tree_rows | orderBy:Pos...
but how to be, if node has leafs with such key Pos too? how to sort branches and leafs of branch via exaclty same field so that nodes are sorted via field, and branches are sorted only in scope of it's parent?