fix: improve infinite scroll reset logic in TableWidgetV2#40609
Conversation
- Refactored the logic for resetting the table state when infinite scroll is enabled or when the component height changes. - Introduced variables to track changes in infinite scroll and component height for clearer condition checks. - Ensured that the table resets correctly under the new conditions to maintain consistent user experience.
WalkthroughThe update refactors the logic in the TableWidgetV2 component's Changes
Sequence Diagram(s)sequenceDiagram
participant TableWidgetV2
participant TableState
TableWidgetV2->>TableWidgetV2: componentDidUpdate(prevProps)
alt Infinite scroll enabled state changed OR (Infinite scroll enabled AND height changed)
TableWidgetV2->>TableState: resetTableForInfiniteScroll()
end
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 📜 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/14903262699. |
|
Deploy-Preview-URL: https://ce-40609.dp.appsmith.com |
Description
Problem
Table would show inconsistent views or appear empty when infinite scroll setting changed or component height was modified.
Root cause
Page number was not reset properly during changes to infinite scroll or component height, causing the table to render an incorrect or empty state.
Solution
This PR handles improving the reset logic for the table when infinite scroll is enabled or component height changes. It refactors the reset conditions, introduces variables to track relevant state changes, and ensures the table resets correctly to maintain consistent behavior.
Fixes #40411
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/14903775919
Commit: efe1c54
Cypress dashboard.
Tags:
@tag.TableSpec:
Thu, 08 May 2025 10:36:21 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit