Hi, I'm using gantt in Next.js application.
I'm initializing the gantt with some data from the server.
The data is shown fine, and when i'm updating predecessor column cell it works too.
The problem is when I'm reordering (drag & drop) the tasks, the predecessors values doesn't change accordingly.
- Do we need to add some configuration for this to work? Are we missing something?
- Moreover I want to set the dependencies (connection) type so the user wont be able to change it, or hide it somehow. How can I do that?
const ganttConfig: BryntumGanttProps = {
draggable: true,
autoHeight: true,
maxHeight: '40rem',
dependencyIdField: 'wbsCode',
features: {
sort: false,
columnLines: false,
regionResize: false,
columnReorder: false,
rowReorder: {
showGrip: true,
},
cellEdit: {
addNewAtEnd: false,
editNextOnEnterPress: false,
},
},
project: {
autoLoad: true,
taskStore: {
wbsMode: 'auto',
},
},
columns: [
{ type: 'wbs', text: '', hidden: true },
{ type: 'rownumber', text: '' },
{
text: t('name')!,
field: 'name',
flex: 1,
},
{ type: 'name', hidden: true },
{
type: 'duration',
text: t('duration')!,
flex: 1,
},
{
type: 'predecessor',
text: t('predecessor')!,
field: 'predecessors',
flex: 1,
},
{
type: 'resourceassignment',
text: t('reporter')!,
showAvatars: true,
flex: 1,
itemTpl: ({ resourceName }: { resourceName: string }) => resourceName,
editor: {
chipView: {
itemTpl: ({ resourceName }: { resourceName: string }) =>
resourceName,
},
},
},
{
type: 'check',
text: t('picture')!,
field: 'is_picture_required',
flex: 1,
},
{
type: 'check',
text: t('required_approval')!,
field: 'is_approval_required',
flex: 1,
},
],
};