grid-js / gridjs

Advanced table plugin
https://gridjs.io
MIT License
4.39k stars 240 forks source link

Cannot read properties of undefined (reading 'length') #1458

Open alexmoraru25 opened 3 months ago

alexmoraru25 commented 3 months ago

Describe the bug For some grid instances either when loading the data or moving to the next page I get one of these errors:

The data is there, loaded but the Previous/Next buttons are disabled and at the very bottom I get another message: An error happened while fetching the data

image

What is more interesting is that sometime it works perfectly, but most of the time not.

Additional context I am using the gridjs-angular component. I have multiple gridjs-angular components in the same page.

I have tried the following:

joeworkman commented 2 months ago

I have this same issue. Were you able to find the root cause?

joeworkman commented 2 months ago

The expection is getting thrown inside of this for loop... inside pipline.ts

CleanShot 2024-07-24 at 10 26 10@2x
joeworkman commented 2 months ago

This occurs when prev is undefined when running await processor.process(prev). I sort of get lost in the weeds after that since I am not familiar enough with the code.

It looks as if the processor is for the pagination in my instance. This makes sense since my table gets built but the pagination is broken.

OussamaKhoubran commented 4 days ago

Any updates about this issue?