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

Please allow users to opt-in for mutable objects for Optimistic UI updates #437

Open
darkbasic opened this issue Nov 23, 2017 · 0 comments

Comments

@darkbasic
Copy link

Use case:

<div *ngFor="let item of items">
  <div>{{ item.name}} {{item.surname}}</div>
</div>

I have a component which lists all the objects of a certain kind and every time time a new object of that kind gets created I want it to show an :entry web-animation on that item.

Everything's fine, until you start using Optimistic UI. With Optimistic UI a new object gets created with a random ID and some presumed-to-be data. The animation immediately starts (we don't have to wait for the server's rensponse), but way before it is supposed to finish that object gets destroyed, because a new immutable object has been binded.

If the user could opt-in for mutable changes for Optimistic UI to real data transitions, that issue wouldn't occur because ngFor is smart enough to do diffes to actually remove only the DOM nodes that are in need to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant