const ganttConfig: BryntumGanttProps = {
project: {
autoLoad: true,
taskModelClass: TaskExtModel,
taskStore: TaskExtStore,
transport: {
load: {
url: 'data/launch-saas.json'
}
},
// This config enables response validation and dumping of found errors to the browser console.
// It's meant to be used as a development stage helper only so please set it to false for production systems.
validateResponse : true
},
//@ts-ignore
projectModelClass : ProjectModelExtended,
columns: [{ type: 'name', field: 'name', width: 250 }],
viewPreset: 'weekAndDayLetter',
barMargin: 10
};
export { ganttConfig };
typescript also swears that there is no such parameter at all
Ver: 5.1.X
When I wrote the ticket, I made a class inherited from the ProjectModel, and entered it in this way into the configuration. However, the added method did not appear in gantt.project
However, the same thing worked for TaskModel
Re: [REACT] ProjectModelClass
Posted: Tue Aug 02, 2022 3:26 pm
by tikhonov.a.p
Any news?
Re: [REACT] ProjectModelClass
Posted: Tue Aug 02, 2022 8:55 pm
by marcio
Could you please share a sample project with how did you set up the classes?? With that, we could help you better fix this.
Re: [REACT] ProjectModelClass
Posted: Wed Aug 03, 2022 8:29 am
by tikhonov.a.p
In the console, you can type gantt.projectModelClass
Or try call gantt.project.testAsd()
Re: [REACT] ProjectModelClass
Posted: Wed Aug 03, 2022 2:39 pm
by tikhonov.a.p
Any news?
Re: [REACT] ProjectModelClass
Posted: Thu Aug 04, 2022 2:31 pm
by alex.l
Since this config is not public and not documented at the moment, wrappers are not supported that as well.
It becomes to be available when we make this config public.
Thank you for your question.
Re: [REACT] ProjectModelClass
Posted: Thu Aug 04, 2022 4:11 pm
by tikhonov.a.p
An interesting point, recommend to use, but do not support the recommendation. Things happen
Re: [REACT] ProjectModelClass
Posted: Thu Aug 04, 2022 4:18 pm
by alex.l
Yes, it has been recommended as a part of Engine overrides that users required. That's true, I don't see we mentioned that it's private now, even if it's not available in docs.
It works well in Vanilla products but, as all others private methods and configs, are not available on wrappers. Wrappers generate automatically using scripts and include only public API to interact.