nuthanon Hi, Can I execute sort-tasks like this? Or how else should I set default sorting when Gantt is rendered? for some reason this code does not work for me api.exec("sort-tasks", { key: "end", order: "asc", });
tasha Hello To set default sorting when Gantt is rendered apply sortin in the init function this way: function init(api) { if (api) { api.exec('sort-tasks', { key: 'start', order: 'desc', }); } } Please check the example: https://stackblitz.com/edit/vitejs-vite-ffsqgcke?file=src%2FGanttComponent.jsx