You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the API documentation a sortChildren function exists which can be called to sort children based on a custom sorting function.
I would like to suggest to allow replacing the existing sorting function instead of calling the sortChildren function on demand. With the existing approach the API user has to know when to call sortChildren to preserve correct node order. With the possibility to insert a permanent sorting functionality like suggested above the API user is able to achieve a custom sorting without having to care for internal implementation details (knowing when to call sortChildren again).
The text was updated successfully, but these errors were encountered:
This could be based on a concept of modification events (see also #419 )
For this special purpose however a childrenModified event would suffice, and we even only would have to listen for adding nodes, since deletions would not affect sort order.
Since sorting may be based not only on the title, but also on custom data properties, I think offering a new modify event is a more flexible and general approach. This would allow a simple pattern like
According to the API documentation a sortChildren function exists which can be called to sort children based on a custom sorting function.
I would like to suggest to allow replacing the existing sorting function instead of calling the sortChildren function on demand. With the existing approach the API user has to know when to call sortChildren to preserve correct node order. With the possibility to insert a permanent sorting functionality like suggested above the API user is able to achieve a custom sorting without having to care for internal implementation details (knowing when to call sortChildren again).
The text was updated successfully, but these errors were encountered: