-
Notifications
You must be signed in to change notification settings - Fork 116
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
setOtherParam #244
Comments
Perhaps something like this will fix your problem. lastPage: null,
lastParamsForBackendCounter: null,
pageChanged: Ember.observer("page", "perPage", function() {
var page = this.get('page');
var lastPage = this.get('lastPage');
var paramsForBackendCounter = this.get('paramsForBackendCounter');
var lastParamsForBackendCounter = this.get('lastParamsForBackendCounter');
if (lastPage != page || lastParamsForBackendCounter != paramsForBackendCounter) {
this.set('lastPage', page);
this.set('lastParamsForBackendCounter', paramsForBackendCounter);
this.set("promise", this.fetchContent());
}
}), I don't know what impact this would have. @alejandrodevs can you take a look while thinking about the remote redesign. |
solved ? i faced the same problem on ember octane |
@ppkpp I never implemented this code because I don't oversee what impact it would have on others. Do you think it would break something? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
setOtherParam will force the ember-cli-pagination to re-fetch current page.. However in my case, it would not work if I were to re-fetch the current page for the second time..
I looked into page-remote-array.js and found out that it doesnt run this.fetchContent() when setOtherParam was fired second time onwards because the lastPage was set to page..
Any idea hw to get this work? I need setOtherParam to re-fetchContent every time it was called..
The text was updated successfully, but these errors were encountered: