Search results

Immutable Mode in Vue Gantt component

02 Dec 2022 / 1 minute to read

The immutable mode optimizes the Gantt re-rendering performance by using the object reference and deep compare concept. When performing the Gantt actions, it will only re-render the modified or newly added rows and prevent the re-rendering of the unchanged rows.

To enable this feature, you have to set the enableImmutableMode property as true.

This feature uses the primary key value for data comparison. So, you need to provide the isPrimaryKey column.

{% tab template=“gantt/immutable” %}

Copied to clipboard
        <ejs-gantt ref='gantt' id="GanttContainer" :dataSource="data" :taskFields = "taskFields" :height = "height" :toolbar="toolbar"
        :editSettings= "editSettings" :enableImmutableMode='true'></ejs-gantt>
import Vue from "vue";
import { GanttPlugin, Edit, Selection, Toolbar } from "@syncfusion/ej2-vue-gantt";
import { projectNewData  } from './data-source.js';
export default {
  data: function() {
        data: projectNewData,
        taskFields: {
            id: 'TaskID',
            name: 'TaskName',
            startDate: 'StartDate',
            duration: 'Duration',
            progress: 'Progress',
            child: 'subtasks'
            toolbar: ['Add', 'Edit', 'Delete', 'Cancel', 'Update', 'Indent', 'Outdent'],
             editSettings: {
                allowAdding: true,
                allowEditing: true,
                allowDeleting: true,
                allowTaskbarEditing: true,
                showDeleteConfirmDialog: true
  provide: {
      gantt: [, Edit, Selection, Toolbar]


The following features are not supported in the immutable mode:

  • Column reorder
  • Virtualization