issue 1: when i change the state, the other state of the checkbox is getting removed.
issue 2: When i change the states multiple times, i am getting stack is overflowed, can you please help me on this.
{
type: "widget",
width: "10px",
field: "estimatedEndDateCheckBox",
widgets: [
{
type: "checkbox",
field: "estimatedEndDateCheckBox",
onAction(props) {
const gantt = props.source.cellInfo.column.grid;
const record = props.source.cellInfo.record;
// Update the record's originalData with the new checkbox state
record.originalData.estimatedEndDateCheckBox = props.checked;
// Refresh the row to ensure the renderer is called
gantt.rowManager.refresh(record);
},
},
],
renderer(data) {
const recordData = data.record.originalData;
// Highlight rows with a hard date constraint
if (recordData?.hardDateConstraint?.EndDate) {
data.rowElement.style.backgroundColor = "#F5E8FF";
} else {
data.rowElement.style.backgroundColor = ""; // Reset background color if no hard date constraint
}
// Show or hide the checkbox based on whether the record can be locked
data.widgets[0].hidden = !recordData.canBeLocked;
// Set the checkbox state based on the record's data
data.widgets[0].checked = recordData?.estimatedEndDateCheckBox || recordData?.hardDateConstraint?.EndDate;
},
},
Based on the snippet that you shared, it's not possible to point out what could be causing the issue.
Is it a custom field? Do you see any errors on the console?
I tried to adapt your column to our Gantt basic demo, but some parts of your configuration are missing. Could you please try to adapt our https://bryntum.com/products/gantt/examples/basic/ with a runnable test case for us to debug?
can you please provide me an example of checkbox column(using widgets or custom checkbox column ), where on click of that particular checkbox, i need to make changes in the same row but different columns