I am using react functional components to render smart-gantt-chart. I am feeding a list of tasks to the Gantt chart after fetching it from a back-end server.
There are a lot of tasks and the date range is also huge, so there are both horizontal and vertical scroll bars present. At each instance where the user creates a connection between two tasks, I save that information and fetch a new set of tasks back from the server.
The problem that I am facing is that whenever I complete this process, the Gantt chart’s scroll position resets back to (0, 0).
How can I save the scroll positions (x, y), so that when I fetch the fresh list of tasks, the user is able to be exactly where he/she was?
I have tried using ‘gantt.loadState()’ function to specify scroll positions for the gantt-chart but that only sets the horizontal scroll, not the vertical one.