Page 1 of 1

[REACT] Recalculating custom fields and sending them to the server

Posted: Thu Feb 09, 2023 11:12 am
by Ayurchenkoi

Hello. When I change a custom field, I want to recalculate the parent nodes and send those changes (also in the parent nodes) to the server, but it only sends the fields I changed with input.
How do I recalculate the parent custom fields and send these recalculated changes to the server?


Re: [REACT] Recalculating custom fields and sending them to the server

Posted: Thu Feb 09, 2023 3:54 pm
by marcio

Hey Ayurchenkoi,

If I understood correctly, you can use https://bryntum.com/products/gantt/docs/api/Core/data/Store#event-change listener to check the new value that you added in the custom field, and after that, use it to re-calculate and set the parent nodes values as you wish.

After that, you can use https://bryntum.com/products/gantt/docs/api/Scheduler/crud/AbstractCrudManagerMixin#function-sync to send the recalculated changes to the server.

If it's not what you're looking for, could you please share how you set up your custom fields and your Gantt?