-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(cdk/a11y): activeItem out of date if active index is removed from ListKeyManager #14471
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
fix(cdk/a11y): activeItem out of date if active index is removed from ListKeyManager #14471
Conversation
Caretaker note: caused change after checked errors in one test in g3 |
53486b5
to
3ee6b9d
Compare
@crisbeto Hi, can you explain why ListKeyManager keeps the old activeItemIndex when it's not present in an array of new values for QueryList? Why this index is not set as -1? (from test list-key-manager.spec.ts:96 it looks as desired behavior) Update: I found this PR, probably it will be changed soon. It causes a lot of problems when it's used together with virtual-scroll and searching functionality |
I was able to get a passing test suite with these changes:
|
3ee6b9d
to
7b8ef4d
Compare
… ListKeyManager Fixes the `activeItem` on the `ListKeyManager` not matching the item at the `activeItemIndex`, if the `activeItem` is removed from the list. Fixes angular#14345.
7b8ef4d
to
719e2d8
Compare
Follow-up to angular#14471. Uses `setActiveItem` instead of `updateActiveItem` which was missed when addressing the feedback.
) Follow-up to #14471. Uses `setActiveItem` instead of `updateActiveItem` which was missed when addressing the feedback.
Rolling back because it caused real issues in Google, not clear why yet |
…ved from ListKeyManager (angular#14471)" This reverts commit e61c2fa.
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. |
Fixes the
activeItem
on theListKeyManager
not matching the item at theactiveItemIndex
, if theactiveItem
is removed from the list.Fixes #14345.
Note: this is a resubmit of #14407.