backbone-paginator/backbone.paginator

sortKey query param is in the url even though it's set to null

Closed this issue · 1 comments

I want to use the sortKey to sort client side, but I don't want to send the key to the server, so I set it to null.

Even though the sortKey is null, the url looks like this`:

/test/?page=1&per_page=25&null=asc

Notice the null=asc.

var MyCollection = Backbone.PageableCollection.extend({
  url: "test",
  state: {
    sortKey: 'test',
  },
  queryParams: {
    sortKey: null,
    order: null,

  },
});

var collection = new MyCollection();

collection.fetch();

Here's a fiddle of the code above.

Nice thanks!