Hello Syncfusion Team,
I'm using ej2-react-gantt with reactjs and redux , and im using REST Api's for actions ( CRUD), i want to handle state when i update it : for example when i do
LeftResizing, RightResizing, ProgressResizing, ChildDrag, i want to get the new state (new dates, progress, ...) of the row to dispatch it into my update action .
i have a try with the taskBarEditing props of gantt but it shows me an error :
TypeError: Cannot read property 'rowUniqueID' of undefined
evry time i want to update it doesn't work and the gantt doesn't re-render again and get the new data !
is there any solution please ??
this is my code :
//.....//
this.editSettings = {
allowAdding: true,
allowEditing: true,
allowDeleting: true,
allowTaskbarEditing: true,
showDeleteConfirmDialog: true,
allowDragging: true,
mode: "Dialog",
};
//.....//
taskbarEditing = (args) => {
if(args?.taskBarEditAction == "ParentDrag") {
args.cancel = true;
}
if (
args.taskBarEditAction == "LeftResizing" ||
args.taskBarEditAction == "RightResizing" ||
args.taskBarEditAction == "ProgressResizing" ||
args.taskBarEditAction == "ChildDrag"
) {
this.props.edit(
args?.editingFields?.taskId,
args?.editingFields?.startDate,
args?.editingFields?.endDate,
args?.editingFields?.progress,
);
}
};
//.....//
<GanttComponent
id="Editing"
dataSource={data}
dateFormat={"MMM dd, y"}
treeColumnIndex={1}
allowSelection={true}
showColumnMenu={false}
highlightWeekends={true}
allowUnscheduledTasks={true}
projectStartDate={this.projectStartDate}
projectEndDate={this.projectEndDate}
taskFields={this.taskFields}
timelineSettings={this.timelineSettings}
labelSettings={this.labelSettings}
splitterSettings={this.splitterSettings}
height="410px"
editSettings={this.editSettings}
gridLines={this.gridLines}
toolbar={this.toolbar}
queryTaskbarInfo={this.queryTaskbarInfo.bind(this)}
toolbarClick={this.toolbarClick.bind(this)}
actionBegin={this.actionBegin}
// actionComplete={this.actionComplete}
taskbarEditing={this.taskbarEditing}
allowSorting={true}
allowFiltering={true}
><Inject
services={[Edit, Selection, Toolbar, DayMarkers, Sort, Filter]}
/></GanttComponent>