Our state of the art Gantt chart


Post by kollster »

In the React version of Gantt, I am trying to set the divider (the vertical draggable bar separating the table and the chart) location of the Gantt react component programatically.

I have tried updating the prop subGridConfigs

<BryntumGantt subGridConfigs={subGrids} {...otherProps} />

from a value like this:

{
  "locked": {
    "width": 131,
    "collapsed": false
  },
  "normal": {
    "collapsed": false
  }
}

to a new value:

{
  "locked": {
    "width":400,
    "collapsed": false
  },
  "normal": {
    "collapsed": false
  }
}

But bryntum Gantt does not reflect the changes. How do I change the divider position of the react component?

Kind regards
Kollster, ProjectFlow A/S


Post by tasnim »

Hi,

How are you changing the position? Could you please show the code?
It's working fine here

            <BryntumGantt
                {...ganttConfig}
                subGridConfigs={{
                    "locked": {
                        "width":131,
                        "collapsed": false
                    },
                    "normal": {
                        "collapsed": false
                    }
                }}
                tbar={[
                    {
                        type : 'button',
                        text : 'change splitter position',
                        onAction(props) {
                            const gantt = props.source.parent.parent;
                            console.log(gantt.widgetMap);
                            gantt.widgetMap.locked.width = 400;
                        }
                    }
                ]}
                extraData={{ handleEditClick }}
            />
        </Fragment>

Post Reply