Skip to content
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

feat(cdk/scrolling): update CdkVirtualForOf to work with sets. #20594

Merged
merged 1 commit into from
Oct 20, 2020

Conversation

howardjing
Copy link
Contributor

@howardjing howardjing commented Sep 17, 2020

The previous usage of Array.prototype.slice.call does not handle Set
objects appropriately (since a Set does not have a length property).
Updated it to use Array.from.

Fixes #20210.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 17, 2020
@howardjing howardjing force-pushed the cdk-scrolling-fix branch 2 times, most recently from 72b2761 to 3a0f4fa Compare September 17, 2020 04:56
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a unit test to make sure it works? Also the way the commit message is formatted won't auto-close the related issue. It should say Fixes #<issue number> or Resolves #<issue number>.

The previous usage of `Array.prototype.slice.call` does not handle `Set`
objects appropriately (since a `Set` does not have a `length` property).
Updated it to use `Array.from`.

Fixes angular#20210.
@howardjing
Copy link
Contributor Author

Thanks for the review! I updated the commit message. I believe the current test make sure that the feature works -- is there anything additional you would like added? There's no corresponding virtual-for-of.spec.ts file, so the existing test seemed like the most appropriate one for me to add.

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test you added should be enough. LGTM.

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Sep 27, 2020
@wagnermaciel
Copy link
Contributor

@crisbeto What's going on with CI here?

@crisbeto
Copy link
Member

crisbeto commented Oct 7, 2020

Not sure, but it wasn't triggered for some reason.

@jelbourn jelbourn merged commit e15f82c into angular:master Oct 20, 2020
jelbourn pushed a commit that referenced this pull request Oct 20, 2020
The previous usage of `Array.prototype.slice.call` does not handle `Set`
objects appropriately (since a `Set` does not have a `length` property).
Updated it to use `Array.from`.

Fixes #20210.

(cherry picked from commit e15f82c)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(cdk/scrolling): extend CdkVirtualForOf to work with iterables
5 participants