Our state of the art Gantt chart


Post by mv2022 »

Is there a possible workaround for this bug? For example, change detection to manually update the UI when the user selects an item from the drop-down. The values do display if I collapse and expand the columns.


Post by alex.l »

All the best,
Alex


Post by mv2022 »

Hi Alex,

To use the finishCellEdit, do I add it to the listener in the ganttConfig? Would you be able to provide an example of how I might use it? Thanks

export const ganttConfig = {
... etc
  listeners: {
    finishCellEdit({ editorContext }) {
           // refresh ?
    }
  }
}

Post by tasnim »

This is how you can do in the angular app:

this.refresh();

Best regards,
Tasnim


Post by mv2022 »

I was able to solve the issue where the dropdown UI was not displaying the selected property. By doing this:

  private addListenerGantt() : void {
    this.addListener = {
      finishCellEdit({ editorContext } : any) {
        const { record, editor, column } = editorContext;
        console.log(record);
        console.log(editor);
        console.log(editor);
        column.refreshCell(record);
      }
    };
  }

However, when I check the values in this.gantt.project.inlineData for eventsData, The selected dropdown value is null for its children. Is there a way I can fix this issue? Please see image.

Attachments
dropdown values are not being updated in the this.gantt.project.inlineData.eventsData
dropdown values are not being updated in the this.gantt.project.inlineData.eventsData
eventsData.PNG (20.93 KiB) Viewed 439 times

Post by tasnim »

Working fine on my side, please see the attachment below.

Ah, Seems like you haven't added the city field to the taskModel.

Here is how you can add it:

project : {
	...
	taskStore : {
		fields : [ 'city' ]
	}
}
Attachments
stockholm.jpg
stockholm.jpg (59.9 KiB) Viewed 427 times

Post by mv2022 »

I have the same config as you do and it does not populate for subtask/children. At the parent level, the "city" property has a value but when I create subtask , there is no "city" property with a value. Please see the attachment.

Attachments
drop-down-error.PNG
drop-down-error.PNG (119.42 KiB) Viewed 426 times

Post by alex.l »

Please attach a runnable test case here with steps to reproduce the issue. It sounds like we are moving in wrong direction.

All the best,
Alex


Post Reply