Page 1 of 1

[REACT] Custom columns

Posted: Mon Apr 12, 2021 9:23 am
by vivianus

I need to replace different column items according to the scene. How do I replace them?

It's useless to assign values directly:

this.gantt.columns = [{
...
}]


Re: [REACT] Custom columns

Posted: Mon Apr 12, 2021 9:26 am
by mats

It's useless to assign values directly:

What do you mean by this?

Replacing columns works well, try this here: https://bryntum.com/examples/gantt/advanced/

gantt.columns = [{ field : 'startDate', text : 'foo' }]

(A name column is always added unless you add one)


Re: [REACT] Custom columns

Posted: Tue Apr 13, 2021 3:48 am
by vivianus

version:2.1.0
But when I use the

 gantt.columns = [{...}]

to set up the column, the Gantt chart on the right is blank.


Re: [REACT] Custom columns

Posted: Tue Apr 13, 2021 7:35 am
by mats

Try upgrading to 4.1.0 and issue is fixed


Re: [REACT] Custom columns

Posted: Wed Apr 14, 2021 5:05 am
by vivianus

Is there a temporary solution for version 2.1.0? which is not convenient to upgrade at present.


Re: [REACT] Custom columns

Posted: Wed Apr 14, 2021 5:58 am
by alex.l

Hi vivianus,

Unfortunately, we cannot provide a workaround for this problem, the only solution we could suggest you: please upgrade your app. It will help to avoid some bugs that are fixed in latest versions.

All the best,
Alex