You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run into a weird behavior that feels like a bug... or maybe there's something that I need to do that I'm not aware of. What am I doing wrong?
If you load the Gantt Advanced demo - https://bryntum.com/products/gantt/examples/advanced/ - and then run this code in the console (run each block and observe the results in the gantt control before running the next block):
// 1) Enable show dirty, and make a change to a name
window.gantt.showDirty = { duringEdit: true };
window.gantt.tasks[2].name = "test"
// Name is correctly shown an as modified
// 2) update percentDone
window.gantt.tasks[2].percentDone = 100;
window.gantt.tasks[2].commitAsync(); // <-- does nothing
window.gantt.project.commitAsync(); // <-- does nothing
// Percent Done is still shown as unmodified, but it is modified
// 3) Poke it by changing % Done column to the same value a gain
window.gantt.tasks[2].percentDone = 100;
// Now it is correctly shown as modified
// 4) Reset to the initial value
window.gantt.tasks[2].percentDone = 50;
// Still shown as modified, though the task is unmodified (or at least it's the original value)
// 5) Reset to the initial value, again
window.gantt.tasks[2].percentDone = 50;
// Now it is correctly shown as unmodified
I detected this while testing buttons in my website for setting percentDone to 0, 25, 50, 75, and 100... it's like the status of percentDone lags by one change... but changing Name responds immediately.
Here's the code that I'm using in my project to try to update the selected tasks to a given percent complete:
chuckn0rris
changed the title
showDirty is lagging the visual feedback for percentDoneshowDirty is lagging the visual feedback for percentDone
Oct 22, 2024
chuckn0rris
changed the title
showDirty is lagging the visual feedback for percentDoneshowDirty is lagging the visual feedback for percentDoneOct 22, 2024
Forum post
I've run into a weird behavior that feels like a bug... or maybe there's something that I need to do that I'm not aware of. What am I doing wrong?
If you load the Gantt Advanced demo - https://bryntum.com/products/gantt/examples/advanced/ - and then run this code in the console (run each block and observe the results in the gantt control before running the next block):
I detected this while testing buttons in my website for setting percentDone to 0, 25, 50, 75, and 100... it's like the status of percentDone lags by one change... but changing Name responds immediately.
Here's the code that I'm using in my project to try to update the selected tasks to a given percent complete:
The text was updated successfully, but these errors were encountered: