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

Can't use trackBy with KeyValuePipe #25452

Closed
jansivans opened this issue Aug 13, 2018 · 2 comments
Closed

Can't use trackBy with KeyValuePipe #25452

jansivans opened this issue Aug 13, 2018 · 2 comments

Comments

@jansivans
Copy link

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:

Current behavior

Using trackBy with KeyValuePipe like

<div *ngFor="let x of obj; trackBy: trackByFn | keyvalue"></div>

Leads to the Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays. error (see StackBlitz below).

Expected behavior

Should be possible to use trackBy.

Minimal reproduction of the problem with instructions

https://stackblitz.com/edit/angular-gitter-p33nwx

Environment


Angular version: 6.1.2
@jansivans
Copy link
Author

Seems like applying ; trackBy: trackByFn AFTER | keyvalue fixes an issue.

@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 Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant