<html lang="en">
<head>
<meta charset="utf-8"/>
<script src="https://www.bryntum.com/examples/build/gantt.module.js" type="module"></script>
<link rel="stylesheet" type="text/css" href="https://www.bryntum.com/examples/build/gantt.default.css"/>
<script type="module">
import {Gantt, TaskModel, TaskStore} from 'https://www.bryntum.com/examples/build/gantt.module.js';
const taskStore = new TaskStore({modelClass: TaskModel});
const gantt = new Gantt({
autoHeight: true,
appendTo: 'gantt',
taskStore: taskStore,
});
taskStore.data = [
{
"id": 1,
"name": "Task 1",
"startDate": "2019-09-18",
"endDate": "2019-09-22",
"expanded": true,
"children": [
{
"id": 2,
"name": "Task 2",
"startDate": "2019-09-18",
"endDate": "2019-09-19"
},
{
"id": 3,
"name": "Task 3",
"startDate": "2019-09-20",
"endDate": "2019-09-22"
}
]
}
];
taskStore.filter(t => false);
taskStore.data = [
{
"id": 1,
"name": "Task 1",
"startDate": "2019-09-18",
"endDate": "2019-09-22",
"expanded": true,
"children": [
{
"id": 2,
"name": "Task 2",
"startDate": "2019-09-18",
"endDate": "2019-09-19"
},
{
"id": 3,
"name": "Task 3",
"startDate": "2019-09-20",
"endDate": "2019-09-22"
}
]
}
];
</script>
</head>
<body>
<div id="gantt"></div>
</body>
</html>
Support Forum
Hi! I'm getting a "Error: Id collision on 1" when running the minimal example below. Do you know why this could be ?
Confirmed, ticket opened. Does it work for you if you clear filter before setting new data?
https://github.com/bryntum/support/issues/211
https://github.com/bryntum/support/issues/211