Query Parameter New: "Refreshmodel" without replacing the whole model

Hi,

I am playing around with the new query parameters. I use it for some kind of pagination. Since the dataset per “page” is slightly complex I am using refreshModel: true. The problem is that this “replaces” the model in the route instead of adding the new ones. If I paginate from page 1 to page 2 I want to keep the records from Page 1. But I do need to query the backend when paginating to page 2 the first time.

Is this possible with the new query parameters, or do I find a work around?

Best Regards, Marc

Ran into a similar problem myself which resulted in me manually calling model and consuming the result and appending to an array which was bound to a table.

I can post examples of this workaround if @machty doesn’t chime in.

Would be great if you cuold provide your solution, if there is no “official” supported solution for this.

Here is the Mixin. It’s experimental is why I was hesitant to post it, and like you said there isn’t an known way to solve this issue. Any feedback on enhancing this would be awesome, but the idea is the state of the table (page/offset) is stored on the controller. Every time model gets called and when the pagination event fires, it will pass in the tableParams object into the model hook.

Since I am not using queryParams, we’re on 1.4, you’ll need to some how adapt this to use queryParams.