Hello,
I’m trying to implement infinite scroll on horizontal scrollbar, so that when the user scrolls to the end of the timeline max date is automatically updated by 2 days.
So far the best thing I’ve written is:
gantt.attachEvent(
'onGanttScroll',
function (_left, _top) {
const grid = document.getElementsByClassName('gantt_task')[0]
if (grid.scrollLeft + grid.clientWidth === grid.scrollWidth) {
gantt.getState().max_date = gantt.date.add(
gantt.getState().max_date,
2,
'day'
)
grid.scrollLeft -= 10
gantt.render()
gantt.showDate(gantt.getState().max_date)
}
},
{}
)
However it’s not working.
Could use some help here.
Thanks in advance