Open gubeils opened 2 months ago
Any chance you could provide the error call stack?
Thank you. While I am fixing the issue, for an immediate fix, you can try checking if you are setting a task with a resourceId for a row that does not exist.
Are there any updates? I faced the same problem. Tasks contain only existing resourceId
.
UPD: I noticed that my tasks had two item with the same id
.
But the issue is still exists when I try to reset rows and tasks by passing empty arrays. It causes only when gantt had rows and tasks before
gantt.$set({ rows: [], tasks: [] });
UPD2: I don't know how it works, but resetting in this way works (when I reset tasks at first, and then reset rows in the queue, exactly in this sequence). And then I can fill it together again (again in the queue)
gantt.$set({ tasks: [] });
setTimeout(() => gantt.$set({ rows: [] }), 0);
setTimeout(() => gantt.$set({ rows, tasks }), 0);
@roman-yukhno-axon I was testing this on v4.4.2 that was just released and it seems like using gantt.$set({ rows: [], tasks: [] });
does not cause any errors. Could you try again? Setting rows: []
when there are tasks still causes errors and I will work on this further.
I am encountering an issue when updating the rows and tasks in svelte-gantt version "^4.3.2". I receive the following error:
Here is a screenshot of my rows and tasks data:![image](https://github.com/ANovokmet/svelte-gantt/assets/102788024/cf999753-39e3-4aeb-9258-fe473a211074)
I am using the method gantt.set({ rows, tasks }) to update the data.