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

Better Documentation for the UpdateInfinityModel hook #74

Closed
hhff opened this issue Aug 17, 2015 · 2 comments
Closed

Better Documentation for the UpdateInfinityModel hook #74

hhff opened this issue Aug 17, 2015 · 2 comments

Comments

@hhff
Copy link
Collaborator

hhff commented Aug 17, 2015

No description provided.

@daniel-de-wit
Copy link

My demo application works great when loading the data on scrolling. But when trying to push objects manually into the infinity model using updateInfinityModel, like explained in the readme, it throws typeError.

For example:

var updatedInfinityModel = this.updateInfinityModel([
        { id: 1, name: "Hugh Francis" }
      ]);

Throws:

Uncaught TypeError: Must pass Ember.Enumerable to Ember.MutableArray#pushObjects

Unfortunately i'm not that familiar with Ember yet. Could you please explain how to use this?

My current setup:

Ember: 1.13.7
Ember Date: 1.13.8
jQuery: 1.11.3

@hhff
Copy link
Collaborator Author

hhff commented Aug 18, 2015

Will look into it as part of this issue @daniel-de-wit . My guess is you need to do something like this:

var updatedInfinityModel = this.updateInfinityModel(Ember.A([
  { id: 1, name: "Hugh Francis" }
]));

@hhff hhff closed this as completed in b320a41 Aug 27, 2015
hhff added a commit that referenced this issue Aug 27, 2015
Document updateInfinityModel hook, closes #74
kxcrl pushed a commit to kxcrl/ember-infinity that referenced this issue Oct 6, 2015
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