Our state of the art Gantt chart
Hi All,
I have an issue.
When assigning a resource to a task and pressing undo/redo it only gives the resources being added or removed in the modelList prop.
there is no oldData prop to compare the changes in the queue.
I have to send the request to the backend with updated assigned resources and because there is no oldData to compare I cannot generate a new list with updated resources.
- Screenshot 2024-03-20 at 3.39.54 PM.png (231.32 KiB) Viewed 131 times
Hi,
Could you please show us how do you get changes? Why don't you use ProjectModel/Store level to handle data changes?
Hi Alex
Sorry, I didn't get your point here. What do you mean by
Why don't you use ProjectModel/Store level to handle data changes?
I am trying to implement functionality for undo-redo and I am getting all the changes from STM.
I don't see the point of using ProjectModel/Store for undo-redo functionality when we have STM for it.
Can you please explain a bit more? Thanks
Yes, you are right about the part of saving data on the server.
The thing I am trying to say is that when we press the undo button an event is fired with a transaction from STM and then I can update the data accordingly on the server.
If I don't have enough data in STM transactions I won't be able to save data on the server properly.
What you are trying to say is that I should get the changes from projectModel. In that case, I would not know which change should I get because I won't know what the user is trying to undo or redo.