0

I'm implementing pagination for my Backgrid powered tables, like so:

footer: Backgrid.Extension.Paginator

And in my Collection:

state: {
   pageSize: 15
}

Now, I haven't actually implemented any handling of pagination server side (which is what I feel might be producing odd results), but it put this HTML in:

enter image description here

Any ideas anyone?

Charles
  • 50,943
  • 13
  • 104
  • 142
benhowdle89
  • 36,900
  • 69
  • 202
  • 331

1 Answers1

3

This is sort of a bug and sort of a mismatched expectation.

The reason it started paging backwards is because your server mode Backbone.PageableCollection didn't have a totalRecords set in state, which is required under server mode according to the documentation.

In addition, Backgrid.Extension.Paginator has a default sliding window of 10 pages, but apparently version 0.1 made an assumption that the collection won't be empty when you decide to summon up a grid, (it basically assumed you'd follow the recommended best practice here), so this case was never checked. Following the progress of this issue here.

Y.H Wong
  • 7,151
  • 3
  • 33
  • 35