How to use the dhtmlx-gantt.gantt.createDataProcessor function in dhtmlx-gantt

To help you get started, we’ve selected a few dhtmlx-gantt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DHTMLX / react-gantt-demo / src / components / Gantt / Gantt.js View on Github external
initGanttDataProcessor() {
    /**
     * type: "task"|"link"
     * action: "create"|"update"|"delete"
     * item: data object object
     */
    const onDataUpdated = this.props.onDataUpdated;
    this.dataProcessor = gantt.createDataProcessor((type, action, item, id) => {
      return new Promise((resolve, reject) => {
        if (onDataUpdated) {
          onDataUpdated(type, action, item, id);
        }

        // if onDataUpdated changes returns a permanent id of the created item, you can return it from here so dhtmlxGantt could apply it
        // resolve({id: databaseId});
        return resolve();
      });
    });
  }

dhtmlx-gantt

An open source JavaScript Gantt chart that helps you illustrate a project schedule in a nice-looking chart.

GPL-2.0
Latest version published 7 months ago

Package Health Score

65 / 100
Full package analysis