This repository was archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Scrolled md-virtual-repeat doesn't rerender when the items change #9315
Copy link
Copy link
Closed
Labels
P1: urgentUrgent issues that should be addressed in the next minor or patch release.Urgent issues that should be addressed in the next minor or patch release.g3: reportedThe issue was reported by an internal or external product team.The issue was reported by an internal or external product team.has: Pull RequestA PR has been created to address this issueA PR has been created to address this issue
Milestone
Description
Actual Behavior:
What is the issue?
Scrolled md-virtual-repeat doesn't rerender when the items change for some configurations of the scroll and the item lists. Occurs when it enters this statement,
https://github.com/angular/material/blame/master/src/components/virtualRepeat/virtual-repeater.js#L700
but the indexes don't change in updateIndexes so this condition fails,
https://github.com/angular/material/blame/master/src/components/virtualRepeat/virtual-repeater.js#L659
And it doesn't reenter the update method and rerender the list with the new items.What is the expected behavior?
Rerenders to show the new items.
CodePen (or steps to reproduce the issue): *
CodePen Demo which shows your issue:
http://codepen.io/benkraft/pen/VjgJNQDetails:
Scroll the list down just a couple of pixels, perhaps so the top border is hidden but all the text on the label "black" is still visible. Click "Switch to new color list". Verify that the list did not switch items. You can reload and click the button without scrolling and it indeed should switch to the correct list.
Angular Versions: *
Angular Version:
1.5Angular Material Version:
v1.0.0-rc5 (and earlier)
Additional Information:
Browser Type: *
ChromeBrowser Version: *
51.0.2704.103OS: *
OS X 10.11.6Stack Traces:
Shortcut to create a new CodePen Demo.
Note: *
indicates required information. Without this information, your issue may be auto-closed.
Do not modify the titles or questions. Simply add your responses to the ends of the questions.
Add more lines if needed.
Metadata
Metadata
Assignees
Labels
P1: urgentUrgent issues that should be addressed in the next minor or patch release.Urgent issues that should be addressed in the next minor or patch release.g3: reportedThe issue was reported by an internal or external product team.The issue was reported by an internal or external product team.has: Pull RequestA PR has been created to address this issueA PR has been created to address this issue