-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Fix problem with scrolling the table when pagination is disabled #41174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…omments for clarity
WalkthroughA new conditional branch was introduced in the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (4)📓 Common learnings
📚 Learning: in react window, visiblestopindex (often renamed as lastrenderedrowinthecurrentview in tablewidgetv2...
Applied to files:
📚 Learning: test cases for the `getconsolidatedinfoforpageload` method have already been added, and the refactor...
Applied to files:
📚 Learning: for listwidgetv2, an empty array supplied by users is internally converted to `[{}]` (a placeholder ...
Applied to files:
🔇 Additional comments (3)
✨ Finishing Touches
🧪 Generate unit tests
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. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected. |
Hey, before the pull request is closed due to inactivity, I wanted to ask what you think of my change? |
This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected. |
This PR has been closed because of inactivity. |
Description
This pull request fixes a issue with TableWidgetV2 where not all table rows were accessible via scrolling when pagination is disabled.
Problem
When pagination is completely disabled (showPagination: false and serverSidePaginationEnabled: false), the number of rows displayed was incorrectly limited to the visible height of the container. This meant that in a table with, for example, 20 rows, only 5-6 rows could be displayed and scrolled, even though all data had been loaded.
Cause
The
getPageSize
function inderived.js
calculated the pageSize based on the container height, even if paging was not used. This limited the number of rendered rows to the calculated pageSize.Solution
The logic was adjusted to return the full number of table rows (
props.tableData.length
) when pagination was disabled. This allows all data to be rendered and scrolled through the table.Summary by CodeRabbit