mharris717 / ember-cli-pagination

Pagination Addon for Ember CLI
MIT License
273 stars 116 forks source link

Infinite remote pagination return same page data #243

Closed FutoRicky closed 6 years ago

FutoRicky commented 6 years ago

When using the infinite remote pagination each time I loadNextPage on the pagedArray it makes the call successfully, I get the correct payload for that page but pagedArray does not add the new data, instead it add a duplicate of the initial 1st page data.

I'm doing something like this:

    ...
  let content = PagedRemoteArray.create({modelName: 'model_name',
    store: this.store,
    page: 1
  });
  this.set('content', content);
    ...

  pagedContent: pagedArray("content", {infinite: true}),

  actions: {
    loadNext: function() {
      this.get('pagedContent').loadNextPage();
    }
  }

Am I doing something wrong or is this a bug?

FutoRicky commented 6 years ago

nvm. I was def doing something wrong on the server