Support Forum
For each project store you can see changes. For each changed record you can get modifications
gantt.project.taskStore.changes
gantt.project.taskStore.changes.modified[0].modifications
Pavlo Miklashevych
Sr. Frontend Developer
Hi
The way which you are telling will always return the first task. But i want some thing else
Let say
1. I have selected a task .
2. click on edit task.
3. modified the particular record let say name
4. Then save it
Now when i do
this.gantt.taskStore.changes - it returns all the records which are not modified also.
The way which you are telling will always return the first task. But i want some thing else
Let say
1. I have selected a task .
2. click on edit task.
3. modified the particular record let say name
4. Then save it
Now when i do
this.gantt.taskStore.changes - it returns all the records which are not modified also.
Yes, because I provide you not ready-to-use code but codesnippets to show you an idea.The way which you are telling will always return the first task.
You need to send data to server after the changes are saved in TaskEditor? Is that correct? If so, you just need to call gantt.project.sync() when editor is getting closed. For example:
features : {
taskEdit : {
editorConfig : {
listeners : {
beforeclose : () => gantt.project.sync()
}
}
},
Also you can set autoSync to true to get your changes synced automatically no matter if they were done by taskeditor/celleditor/console/some custom editor etc.
Pavlo Miklashevych
Sr. Frontend Developer
I'm having the same problem with changes afecting all the records with no relation between the modified record and the "others" that appear in modified property. Normally it's because of the "id" property being changed...how do we prevent this from happening ?
In Ext versions we compared the values and made a commit to a task (task.commit()) to prevent these records from being sent to the server.
Also, when one is not using crudManager, how does sync helps ?
In Ext versions we compared the values and made a commit to a task (task.commit()) to prevent these records from being sent to the server.
Also, when one is not using crudManager, how does sync helps ?
Could you please elaborate on this? What kind of changes? How does one change cause another if there's no relation?changes afecting all the records with no relation between the modified record and the "others" that appear in modified property
Maybe you need a commit method on store?
ProjectModel appears in the changes.modified with the modifications "id": "_generatedprojectmodel1" when we change a name of a task.Could you please elaborate on this? What kind of changes? How does one change cause another if there's no relation?
The commit would only make sense after a successfull request to the server, correct ?
I tried to reproduce this on online advanced demo and cannot see the problem. Project model doesn't appear (and shouldn't) in changeset. Could you please provide a test case or steps to reproduce on our demo?
Yes, that is correct.The commit would only make sense after a successfull request to the server, correct ?
Hi,
I've found that in Advanced demo you can replicate this when you add a sibling task of root task, where a modified ProjectModel object appears in changes.
This image is from the attached project, where additional 5 tasks appear as modified when adding a sibling task of the root task.
Our problem here is that with previous versions we could just commit a single task and ignore the changes, but we could not yet figure out how we can do this we bryntum gantt js version.
Thank you.
I've found that in Advanced demo you can replicate this when you add a sibling task of root task, where a modified ProjectModel object appears in changes.
This image is from the attached project, where additional 5 tasks appear as modified when adding a sibling task of the root task.
Our problem here is that with previous versions we could just commit a single task and ignore the changes, but we could not yet figure out how we can do this we bryntum gantt js version.
Thank you.
- Attachments
-
- advanced.zip
- (1.81 MiB) Downloaded 90 times