Page 1 of 1

[ANGULAR] Cell editing event from edit menu

Posted: Thu Jan 26, 2023 1:34 am
by johanbrodin

Hi,

We want to receive events when cell names have been modified. Below code snip-it works fine if you double press on a cell name and edit. However which event should we listen to if you right click on a task and select edit in the dropdown?

Looking through your documentation we could not find a matching one. Also a small comment, independent on how you change name it feels most user friendly to have one event.

this.gantt.on('finishCellEdit', (event: any) => {
    	var task = this.ganttComponent.instance.project.taskStore.getById(event.editorContext._id);
      	return true;
});
   
this.gantt.on('beforeComplete', (event: any) => { //we tried this as well but did not trigger });

Re: [ANGULAR] Cell editing event from edit menu

Posted: Thu Jan 26, 2023 4:50 am
by alex.l

Hi johanbrodin,

The event you used is triggered by UI level feature, when cellEdit feature used. There is another feature https://bryntum.com/products/gantt/docs/api/Gantt/feature/TaskEdit that used to show TaskEditor and it has own events, as example https://bryntum.com/products/gantt/docs/api/Gantt/feature/TaskEdit#event-afterTaskEdit

We do have one event for any modification of task on data level, it's triggered by TaskStore, please see https://bryntum.com/products/gantt/docs/api/Gantt/data/TaskStore#event-change


Re: [ANGULAR] Cell editing event from edit menu

Posted: Sat Jan 28, 2023 5:28 pm
by johanbrodin

Thx! The taskstore is working fine. We also figured out to catch it from the gantt html widget "(onDataChange)". Please close the ticket.