Sarveshgithub / sfdc-lwc-lightning-datatable

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

the "last" button is not working #94

Closed Sarveshgithub closed 2 years ago

Sarveshgithub commented 2 years ago

type : bug

feature : Pagination

What I have tested : Pagination "last" button

Input : all contacts name with a limit of 10 and with 20 contacts in total

Result : the "last" button is not working

cause : method lastPage in the javascript controller

the current 'formula' is this.offSet = (this.totalRows / this.limit) * this.limit

I believe it should be : this.offSet = this.totalRows - this.limit

Originally posted by @mickaelgudin in https://github.com/Sarveshgithub/sfdc-lwc-lightning-datatable/discussions/71#discussioncomment-3629318