Our state of the art Gantt chart
Hi,
Steps to reproduce:
Open https://bryntum.com/products/gantt/examples/cellselection/
Add code to the bottom:
n.on('beforeCellEditStart', ({ source, editorContext }) => {
return editorContext.rowIndex % 2 === 0;
});
Confirm every other cell in Name column is non-editable.
Highlight multiple cells in Name column.
Double click on last one that is highlighted and editable (pressing Ctrl).
Change the value.
Press ctrl + enter to submit.
Observe all the highlighted cells were changed (including non-editable ones).
Thanks, is there a workaround that we could use in the meantime? Can I hook into before sync and revert the changes somehow? Any hints would be appreciated.
Hey,
A possible workaround would be to cancel the change on the store, you can use the following snippet
project : {
taskStore: {
listeners: {
beforeUpdate : ev => {
const ganttEl = bryntum.query('gantt')
if(ganttEl) {
const row = ganttEl.getRowFor(ev.record.id)
if(row) {
return row.index % 2 === 0;
}
}
return;
}
}
}
}
Best regards,
Márcio
How to ask for help? Please read our Support Policy