Our state of the art Gantt chart


Post by matteopasqualin »

Hello,

the following code worked as expected - before - 2.1.1 release:

const project = new ProjectModel({
    transport: {
        load: {
          requestConfig: {
                url: '/api/gantt/load',
                headers: {
                    'Authorization': 'Bearer ***',
                    'Content-Type': 'application/json; charset=utf-8'
                }
            }
        },
. . .
        


now I get the following error: Trying to request without url specifying

I did manage to make it working again by adding the property also to the load object:

const project = new ProjectModel({
    transport: {
        load: {
          url: '/api/gantt/load',
          requestConfig: {
                url: '/api/gantt/load',
                headers: {
                    'Authorization': 'Bearer ***',
                    'Content-Type': 'application/json; charset=utf-8'
                }
            }
        },

can you please check it?

PS: by the way, same thing for the - sync - task

Thank you

Post by mats »

URL is supposed to be put on the load/sync objects, requestConfig is for "non-url" fetch options.

Post by matteopasqualin »

Hello mats,

I see, but maybe the documentation needs to be adjust:

https://www.bryntum.com/docs/gantt/#Gantt/model/ProjectModel#config-transport

Thanks a lot

Post by pmiklashevich »

We will update docs, thanks!

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply