New Bryntum user here, so apologies in advance if I'm churning over old ground.
My Gantt chart loads tasks, dependencies and assignments data into respective local state value on page load (i.e. useEffect({}, [])). I've added an Assigned Resources column, but the data from my DB call doesn't render upon page load, but only after an edit to the gantt chart, any edit.
My ganttConfig and projectConfig are as follows:
const ganttConfig: Partial<GanttConfig> = {
columns: [
{
type: 'name',
field: 'name',
width: 250
},
{
type: 'resourceassignment',
itemTpl: (assignment: any) => assignment.resourceName,
editor: {
chipView: {
itemTpl: (assignment: any) => assignment.resourceName
}
}
}
],
viewPreset: 'weekAndDayLetter',
barMargin: 10,
height: 600
};
const projectConfig: Partial<ProjectModelConfig> = {
calendar: 'general',
// startDate: DateHelper.add(DateHelper.clearTime(new Date()), 0, 'day'),
hoursPerDay: 24,
daysPerWeek: 5,
daysPerMonth: 20,
autoSync: false
};
The project model and gantt components are called as follows:
<BryntumProjectModel
ref={projectRef}
{...projectConfig}
tasks={tasks}
dependencies={dependencies}
resources={resources}
assignments={assignments}
/>
<BryntumGantt
ref={ganttRef}
project={projectRef}
{...ganttConfig}
onDataChange={syncData}
/>
Any suggestions as to what I can do to render the data in the Resource Assignments column upon page load?