import Ember from 'ember';
import $ from 'jquery';

export default Ember.Mixin.create({
  queryParams: {
    page: { refreshModel: true },
    sort: { refreshModel: true },
    size: { refreshModel: true }
  },
  mergedQueryOptions: {},
  model( params ) {
    const options = {
      sort: params.sort,
      page: {
        number: params.page,
        size: params.size
      } };
    $.extend( options, this.get('mergedQueryOptions') );
    return this.store.query( this.get('modelName'), options );
  }
});

@@ -94,24 +94,60 @@
 ryParams: %7B%0A
+    filter: %7B refreshModel: true %7D,%0A
     page: %7B 
@@ -173,19 +173,19 @@
 %7D,%0A    s
-ort
+ize
 : %7B refr
@@ -199,35 +199,35 @@
 l: true %7D,%0A    s
-ize
+ort
 : %7B refreshModel
@@ -278,16 +278,14 @@
 del(
- 
 params
- 
 ) %7B%0A
@@ -306,16 +306,45 @@
 ons = %7B%0A
+      filter: params.filter,%0A
       so
@@ -436,16 +436,20 @@
 %0A      %7D
+%0A   
  %7D;%0A    
@@ -457,17 +457,16 @@
 .extend(
- 
 options,
@@ -496,17 +496,16 @@
 ptions')
- 
 );%0A    r
@@ -527,17 +527,16 @@
 e.query(
- 
 this.get
@@ -557,17 +557,16 @@
  options
- 
 );%0A  %7D%0A%7D

Add filter as queryParam that triggers a refreshModel