I am trying to use the standard edition Gantt version 5.1.0 in a project. On initial load I would like to have the tasks sorted by start date. But when I include the following line:
gantt.sort(“start_date”, true);
I get an error in the browser console as follows:
Uncaught TypeError: t._getVerticalScrollbar is not a function
at n.t._scroll_state (dhtmlxgantt.js:10)
at n.t.getScrollState (dhtmlxgantt.js:10)
at n.t.render (dhtmlxgantt.js:10)
at n.sort (dhtmlxgantt.js:10)
at dhtmlxgantt.html:17
I have also enabled the feature to click on a specific column header to sort by that column. That functionality works if I remove the gantt.sort line from the javascript code.
Following is the code that reproduces the problem.