Sarveshgithub / sfdc-lwc-lightning-datatable

Salesforce Lighting Data table
MIT License
78 stars 28 forks source link

[ BUG ] - Pagination is blocked to 2000 max due to offset limitation #215

Closed mickaelgudin closed 1 year ago

mickaelgudin commented 1 year ago

Describe the bug Since the maximum SOQL offset is 2000 the pagination currently doesn't work if we reach a page where the offset is set to a number greater than 2000.

There isn't a suitable fix as of now

We could avoid using an offset by order by Id and adding a condition in the where clause Id > Last record id of the previous page : problem is this would break the order feature on columns

@Sarveshgithub I think we can leave this open and mark it as wont-fix for now

Sarveshgithub commented 1 year ago

@mickaelgudin yhea offset has limit, wonder, if anyone went upto 2000, offset 😀,

let suppose limit = 10,
2000/10 = 200 pages who has time to click 200 pages 😁

it will break when total records > 2000 but people usually used this component as related list, mostly 2000 child is rare

mickaelgudin commented 1 year ago

@Sarveshgithub I agree

But I think we should write a warning in bold in the readme that's the only option for now.