Our state of the art Gantt chart


Post 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

All the best,
Alex


Post 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.

Best regards.


Post by alex.l »

What about taskRecord.isPhantom ? does it work for you?

All the best,
Alex


Post by hien.nguyen »

It's OK,

After save new task success (sync and return from API is OK). But

sync

keep call forever.

Best regards.


Post 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.

All the best,
Alex


Post by hien.nguyen »

It still happen, BTW please share me

cases

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]}

Best regards.


Post 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?

All the best,
Alex


Post Reply