-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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): extend CdkVirtualForOf to work with iterables #20210
Labels
area: cdk/scrolling
feature
This issue represents a new feature or feature request rather than a bug or bug fix
P4
A relatively minor issue that is not relevant to core functions
Comments
howardjing
added a commit
to howardjing/components
that referenced
this issue
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`. addresses angular#20210
howardjing
added a commit
to howardjing/components
that referenced
this issue
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`. addresses angular#20210
howardjing
added a commit
to howardjing/components
that referenced
this issue
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`. addresses angular#20210
howardjing
added a commit
to howardjing/components
that referenced
this issue
Sep 27, 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 angular#20210.
jelbourn
pushed a commit
that referenced
this issue
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.
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. |
wagnermaciel
pushed a commit
to wagnermaciel/components
that referenced
this issue
Jan 14, 2021
…ar#20594) 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.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area: cdk/scrolling
feature
This issue represents a new feature or feature request rather than a bug or bug fix
P4
A relatively minor issue that is not relevant to core functions
Feature Description
Currently
CdkVirtualForOf
supports data from anArray
,Observable<Array>
, orDataSource
. I would like it to support data from anIterable
as well. This would match the behavior ofNgForOf
which supports elements of bothT[]
andIterable<T>
.According to the documentation at https://material.angular.io/cdk/scrolling/overview#creating-items-in-the-viewport,
*cdkVirtualFor
supports the exact same API as*ngFor
. However*ngFor
supports iterables while*cdkVirtualFor
does not.See https://stackblitz.com/edit/angular-bnbcza?file=src%2Fapp%2Fcdk-virtual-scroll-context-example.html for an example. In the linked example, using
cdkVirtualFor
does not render the set, whilengFor
does render the set.Use Case
This would make
cdkVirtualFor
closer tongFor
. I'm happy to try to implement this myself and create a PR, although I don't know how involved that would be.The text was updated successfully, but these errors were encountered: