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

Adding without scroll action, Deleting records #154

Closed
Diodeus opened this issue Apr 18, 2016 · 2 comments
Closed

Adding without scroll action, Deleting records #154

Diodeus opened this issue Apr 18, 2016 · 2 comments

Comments

@Diodeus
Copy link

Diodeus commented Apr 18, 2016

  1. If I add records on the object on modelPath, how can I trigger them to be rendered without having to push them individually? I'd like it to be able to just listen for changes and refresh the contents.

  2. How do I get it to update when I remove a record?

@hhff
Copy link
Collaborator

hhff commented Apr 18, 2016

Hi @Diodeus !

  1. This is unrelated to ember-infinity - just use pushObjects and the list should update automatically

  2. using removeAt or removeObject/s should do the trick

Essentially - just use the MutableArray methods on the infinityModel (usually at controller.model), and the template will update.
http://emberjs.com/api/classes/Ember.MutableArray.html

@hhff
Copy link
Collaborator

hhff commented Apr 18, 2016

closing - let me know if you need further help

@hhff hhff closed this as completed Apr 18, 2016
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

2 participants