Our state of the art Gantt chart


Post by johanbrodin »

Hi,

We have a use case with a parent task having children tasks. The user shall be able to rearange the order of the children but it shall not be possible to drag them outside the parent.

So we need a listener that returns either true or false if the drop is allowed. Below is an example but we cannot find the event name in the documentation.

      	//listener - beforeTaskDropFinalize is only trigging if start data change
     	this.gantt.on('WHAT SHOULD WE ADD', (event: any) => {
        	const { context } = event;
                console.log(context);
      	});

Regards
Johan


Post by mats »

It's this event: https://bryntum.com/products/gantt/docs/api/Grid/feature/RowReorder#event-gridRowBeforeDropFinalize and it's fired on the feature actually.

this.gantt.features.rowReorder.on('gridRowBeforeDropFinalize', (event: any) => {
        	const { context } = event;
                console.log(context);
      	});

Post by johanbrodin »

Thank you Mats! It is working as expected and you can close the ticket.


Post Reply