Hi,
I want to refresh gantt after adding new task. I'm using react typescript.
Thanks,
Bharat
Try
gantt.refreshRows()
https://bryntum.com/products/gantt/docs/api/Gantt/view/Gantt#function-refreshRows
All the best,
Alex
The code I provided is correct to refresh Gantt in all frameworks. But actually you should not be needed to refresh Gantt after any add/remove records operation, as Animal already mentioned.
If your question is how to catch the moment of adding new task to run refresh, then the answer is: you can subscribe on TaskStore's add
event.
https://bryntum.com/products/gantt/docs/api/Gantt/data/TaskStore#event-add
If you don't know how to add listeners, I would recommend you to check our examples for React, and review our guides for React
https://bryntum.com/products/gantt/docs/api/guides-integration-react
All the best,
Alex