Our blazing fast Grid component built with pure JavaScript


Post by pkuehne_sharesuite »

Good morning,

I am having an issue with updating entries.
I get following exception:

TypeError: Cannot read properties of undefined (reading 'forEach')
    at AjaxStore.processReturnedData (https://localhost:4200/main.js:414912:26)
    at https://localhost:4200/main.js:414859:22
    at ZoneDelegate.invoke (https://localhost:4200/polyfills.js:3080:158)
    at Object.onInvoke (https://localhost:4200/main.js:76979:25)
    at ZoneDelegate.invoke (https://localhost:4200/polyfills.js:3080:46)
    at Zone.run (https://localhost:4200/polyfills.js:2819:37)
    at https://localhost:4200/polyfills.js:4165:28
    at ZoneDelegate.invokeTask (https://localhost:4200/polyfills.js:3113:171)
    at Object.onInvokeTask (https://localhost:4200/main.js:76967:25)
    at ZoneDelegate.invokeTask (https://localhost:4200/polyfills.js:3113:54)

But the structure of the response of the update method, matches the one of the read method.

So for the store we have defined:

 
...
responseDataProperty: 'result.data',
responseTotalProperty : 'result.totalLength' 
...

I also attached an image of the stacktrace.

Do you spot anything that I am doing wrong here?

Attachments
Bildschirmfoto von 2022-06-30 07-43-18.png
Bildschirmfoto von 2022-06-30 07-43-18.png (71.4 KiB) Viewed 385 times

Post by tasnim »

Could you please provide the steps to reproduce that?


Post by pkuehne_sharesuite »

I have created a Grid with an AjaxStore looking like this:

 this.store = new AjaxStore({
            modelClass: GridTaskModel,
            useRestfulMethods : true,
            httpMethods : {
                read : 'GET',
                update : 'PATCH',
            },
            readUrl: this.TASK_API,
            updateUrl: this.TASK_API,
            params: {
                ctxId: this.workspaceEnv.getWorkspaceId()
            },
            autoCommit: true,
            pageParamName   : 'page',
            pageSizeParamName: 'limit',
            sortParamName   : 'sort',
            filterParamName : 'filter',
            responseDataProperty: 'result.data',
            responseTotalProperty : 'result.totalLength',

    });
    

Then I have a Name column for an entry which I can change.
As soon as I change and the store autocommits, I get this error.


Post by alex.l »

Thank you for clarifications, I've opened a ticket to fix this bug https://github.com/bryntum/support/issues/4871

All the best,
Alex


Post by pkuehne_sharesuite »

Sounds good.
Do you know an approximate date when this will be fixed?

Greetings


Post by alex.l »

Not yet, it should be reviewed by our Product Management and scheduled. Please subscribe on ticket updates, you will get notification when a milestone will be appleid, as well as when it will be resolved.

All the best,
Alex


Post Reply