fix: Incorrect page count when number of records in page is different from page size
Description
Total page count is incorrect when no. of records in a page is different from the visual page size of a table.
This is happening because we are calculating the total page count based on the page size of the table. The page size is calculated from the number of rows visible in the table without scrolling.
Fixed this by taking page size as the number of records in the current page.
Fixes #17187
Type of change
- Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
- Manually tested
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| appsmith | ✅ Ready (Inspect) | Visit Preview | Oct 20, 2022 at 11:51AM (UTC) |
Unable to find test scripts. Please add necessary tests to the PR.
/ok-to-test sha=f077fb7
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3247842372.
Workflow: Appsmith External Integration Test Workflow.
Commit: f077fb7.
PR: 17535.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17535&runId=3247842372_1
/perf-test ref=rhito/feat/compare-with-lt-standard-deviation-for-regression
@souma-ghosh The table seems to be crashing on reload. Can you please check?

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3248121814.
Workflow: Appsmith External Integration Test Workflow.
Commit: ``.
PR: 17535.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17535&runId=3248121814_1
@laveena-en Should work fine now. Could you check?
Tested and verified.
/ok-to-test sha=5333573
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3249726201.
Workflow: Appsmith External Integration Test Workflow.
Commit: 5333573.
PR: 17535.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17535&runId=3249726201_1
/ok-to-test sha=70ef2a3
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3272543633.
Workflow: Appsmith External Integration Test Workflow.
Commit: 70ef2a3.
PR: 17535.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17535&runId=3272543633_1
/ok-to-test sha=fcff23e
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3279930805.
Workflow: Appsmith External Integration Test Workflow.
Commit: fcff23e.
PR: 17535.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17535&runId=3279930805_1
/ok-to-test sha=6f4ee8c
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3289468923.
Workflow: Appsmith External Integration Test Workflow.
Commit: 6f4ee8c.
PR: 17535.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17535&runId=3289468923_1
Merged this given @souma-ghosh had a manual sign off for all the teams