mharris717 / ember-cli-pagination

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

Nested keys don't seem to be supported in params.paramMapping #254

Open BillBrower opened 6 years ago

BillBrower commented 6 years ago

I am having an issue very similar to https://github.com/mharris717/ember-cli-pagination/issues/206.

That said the meta portion my response is a little bit different:

"meta": {
    "pagination": {
        "page": 1,
        "pages": 6,
        "count": 26
    }
}

I am using params.paramMapping in my route's model function:

params.paramMapping = {
  page: "page",
  perPage: "page_size",
  total_pages: "pagination.pages"
};

But it doesn't seem to work, I still get this in the console:

no total_pages in meta response
pagination: Object { page: 1, pages: 6, count: 26 }

and my page never loads (although that might be a separate issue. I'm using the isFulfilled attribute on the paged-remote-array to display a spinner).

Redsandro commented 4 years ago

Same problem here. There are some other binding problems.

image