fix: reset table page number on infinite scroll reset#40603
Conversation
Updated the resetTableForInfiniteScroll method to reset the page number to 0 when the table is reset, ensuring proper pagination behavior during infinite scrolling.
WalkthroughThis change updates the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant TableWidgetV2
User->>TableWidgetV2: Toggle Infinite Scroll
activate TableWidgetV2
TableWidgetV2->>TableWidgetV2: resetTableForInfiniteScroll()
TableWidgetV2->>TableWidgetV2: resetWidget(widgetId, false)
TableWidgetV2->>TableWidgetV2: updatePageNumber(0, ON_NEXT_PAGE)
deactivate TableWidgetV2
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (6)
🔇 Additional comments (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
/build-deploy-preview skip-tests=true |
|
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/14884949043. |
|
Deploy-Preview-URL: https://ce-40603.dp.appsmith.com |
Description
Problem
Table pagination would not reset properly when infinite scroll was reset, leading to incorrect data display or user being stuck on a non-existent page.
Root cause
The
resetTableForInfiniteScrollmethod did not reset the page number, causing the table to continue from an outdated page index.Solution
This PR handles resetting the page number to 0 in the
resetTableForInfiniteScrollmethod, ensuring the table starts from the first page during infinite scroll resets for consistent pagination behavior.Fixes #40594
or
Fixes
Issue URLWarning
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.
Automation
/ok-to-test tags="@tag.Table"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/14884926062
Commit: ec11d16
Cypress dashboard.
Tags:
@tag.TableSpec:
Wed, 07 May 2025 14:22:58 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit