Ok it seems one can use the following pattern to achieve this. CodeSanbox
return (
<GanttComponent
id="gantt"
ref={ganttRef}
dataSource={SelfReferenceData}
taskFields={taskFields}
allowReordering={true}
allowRowDragAndDrop={true}
taskMode="Auto"
taskType="FixedWork"
workUnit="Hour"
allowSelection={true}
allowResizing={true}
allowUnscheduledTasks={true}
// enableContextMenu={true}
highlightWeekends={true}
editSettings={ganttSettings}
toolbar={ganttToolbarInitial}
renderBaseline={true}
baselineColor="red"
projectStartDate={projectStartDate}
projectEndDate={projectEndDate}
showOverAllocation={true}
enableMultiTaskbar={true}
showInlineNotes={true}
showColumnMenu={true}
selectionSettings={{ type: "Multiple" }}
height="450px"
actionComplete={(e) => {
if (e?.requestType === "refresh") {
const flatdata = ganttRef.current?.flatData?.map((d) => d.taskData);
console.log(flatdata);
}
}}