Sort lightbox resources

Hi all,
The resource lightbox seems to be sorted on IDs. How can I sort on text ?
regards

Hello,
When Gantt creates options for the resources lightbox section, it iterates all resource items. And they are iterated depending on their IDs.
You can manually sort the array with lightbox resources after it is created.

If you use the simpler gantt.config.resources configuration, you can do that in the lightbox_resources function:
https://snippet.dhtmlx.com/lf5p3nm2

If you use the older approach, you can do that after creating an array with the resource options:
https://snippet.dhtmlx.com/aolnih30

1 Like

Thank you ramil ! It works