Our state of the art Gantt chart


Post by vanik »

Hello Team,

I am using Gantt + Scheduler Pro for one of my screens, and in the same screen I need to display Gantt component alone on a condition and display both Gantt +Scheduler Pro on another condition. If I am setting the code like below:

ganttRef.current = new Gantt({
            ...ganttConfig,
            appendTo: elementRef.current
            });
 if(!isSchedulerHidden){
            splitterRef.current = new Splitter({
                appendTo : elementRef.current
            });
            
schedulerRef.current = new SchedulerPro({ ...schedulerConfig, appendTo: elementRef.current }); schedulerRef.current.addPartner(ganttRef.current); } return ( <div ref={elementRef}> </div> );

Its occupying an empty space below even though Scheduler Pro needs to be hidden. My requirement is :
Gantt needs to be shown always, but if Scheduler Pro is enabled it needs to be shown along with Gantt, else Gantt occupies entire space.

Thanks,
Vani


Post by vanik »

Hi Team,
Any update on my query?

Thanks,
Vani


Post by saki »

You can hide scheduler with:

schedulerRef.current.instance.hidden = true; // false would show it

Note: You should not need to use appendTo and create new Bryntum components manually. Use wrappers instead, it's a better way.


Post Reply