-
Notifications
You must be signed in to change notification settings - Fork 6.8k
test(cdk/scrolling): add test for contracting range #19030
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
test(cdk/scrolling): add test for contracting range #19030
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
0f42873
to
6076801
Compare
// The range should never be greater than the data. | ||
range.end = Math.min(range.end, this.getDataLength()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep it consistent, you could do the same for range.start
. I think it would be good to not assume that the virtual scroll always starts at 0
.
range.start = Math.max(range.start, 0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relates to #23578
There are some cases in Google where users do not attach with I think this logic should end up in the strategies to avoid this |
Adds a test to the scrolling module for the case where the amount of data is reduced.
6076801
to
06d6b6c
Compare
The underlying issue was resolved in a different PR. I'll keep the unit test from this one. |
Adds a test to the scrolling module for the case where the amount of data is reduced.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds a test to the scrolling module for the case where the amount of data is reduced.