Page 2 of 2
Re: [REACT] Open add new task popup
Posted: Tue Jan 17, 2023 1:45 pm
by alex.l
I guess you meant task reordering. In that case you could check if dropped record has an id
or not. In case it doesn't that means a record was just created. We have a flag on TaskModel for that https://bryntum.com/products/gantt/docs/api/Core/data/Model#property-isPhantom
Re: [REACT] Open add new task popup
Posted: Wed Jan 18, 2023 2:50 am
by hien.nguyen
Yes, it's my case (reordering). But in case task was just created, it still have id =
_generatedClassDefEx_5e9917ca-f9c7-4066-b75d-9a4258c00615
for example.
Re: [REACT] Open add new task popup
Posted: Wed Jan 18, 2023 1:48 pm
by alex.l
What about taskRecord.isPhantom
? does it work for you?
Re: [REACT] Open add new task popup
Posted: Fri Jan 27, 2023 3:43 am
by hien.nguyen
It's OK,
After save new task success (sync and return from API is OK). But
keep call forever.
Re: [REACT] Open add new task popup
Posted: Fri Jan 27, 2023 4:33 am
by alex.l
Try to debug it and see why? In no luck, please share a test case, we will be happy to help you with that.
Re: [REACT] Open add new task popup
Posted: Fri Jan 27, 2023 6:47 am
by hien.nguyen
It still happen, BTW please share me
that make sync keep be called forever. My case it call update data forever.
My post data to API
{"type":"sync","requestId":16747940161276,"revision":4,"tasks":{"updated":[{"readOnly":false,"id":129456,"afterId":""}]},"project_id":"3060694"}
Response from server
{"success":true,"requestId":16747940161276,"revision":5,"id":129456,"msg":"Save Task 5 success","ids":[129456]}
Re: [REACT] Open add new task popup
Posted: Fri Jan 27, 2023 6:54 am
by alex.l
Hi hien.nguyen,
I understood the problem, but I should be able to reproduce it and check the code you used to make a ticket or help you fix it in your code.
Are you using latest released version? How can I reproduce that? Do you have any extra logic/listeners that triggers event model change or update action? Do you see this problem in our examples?