mharris717 / ember-cli-pagination

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

remove call to defineProperty when value is a number #253

Closed iezer closed 6 years ago

iezer commented 6 years ago

@broerse Seems like there was one place where we shouldn't be using Ember.defineProperty because the value is a number, the page number.

fixes #251

broerse commented 6 years ago

@iezer Thanks for this. I just published a new version but I am not sure it is 100% OK. https://bloggr.exmer.com does not seem to update the model anymore on record create. Perhaps this has nothing to do with ember-cli-pagination but this failing behavior seems to started when I updated ember-cli-pagination. Will take a look later.

iezer commented 6 years ago

@broerse I found a similar issue and reproduced in this twiddle. The issue comes when the input to the pagedData helper changes. A common use case would be if you do filtering or sorting on the data before local pagination.

I tracked the cause of the issue to this change where content is set using Ember.defineProperty. I'm not sure how to fix it without triggering the deprecation but will keep looking.