You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I found though, is that when the CP's change, the InfinityModel is not triggered for a reload. The new CP values are only applied when the next page is requested from the server, which of course, also upsets the paging since filtered records have a completely different page count.
Alright, so ... am I completely out of scope of ember-infinity?
If not, is filtering a valid use case for the CP parameters in InfinityModel? Or should I trigger a complete reload of the whole Route.model() hook instead?
If filtering should be possible with InfinityModel (now or future) then I guess, some thoughts should go into:
watch ComputedProperties for changes
figure out if they change the expected result set (i.e. filtered)
reset paging
replace model with new records and update paging meta information
Any ideas would be highly appreciated! :-)
The text was updated successfully, but these errors were encountered:
hi @mphasize ! That's expected behavior on the ember-infinity side. To replace everything - you should use Route#refresh when changing the bound values :)
@hhff Thanks for the quick response! I feared it would be like that... ;-)
I had hoped otherwise, because doing a full transition with Route.refresh clears away my whole outlet until the model() hook resolves – which looks awful in the app I'm working on. Looks like we need to find a different solution then. :-)
Hi again. :)
Following the instructions here https://github.com/hhff/ember-infinity#infinitymodel I added ComputedProperties to the InfinityModel request url, because I thought this would be great for implementing server side filtering together with pagination.
What I found though, is that when the CP's change, the InfinityModel is not triggered for a reload. The new CP values are only applied when the next page is requested from the server, which of course, also upsets the paging since filtered records have a completely different page count.
Alright, so ... am I completely out of scope of ember-infinity?
If not, is filtering a valid use case for the CP parameters in InfinityModel? Or should I trigger a complete reload of the whole Route.model() hook instead?
If filtering should be possible with InfinityModel (now or future) then I guess, some thoughts should go into:
model
with new records and update paging meta informationAny ideas would be highly appreciated! :-)
The text was updated successfully, but these errors were encountered: