1

I'm trying to use setPage method of vue-tables-2 library after used fetchMore from vue-apollo, But the issue its when the query get the new result, the table it's still on the first page

mounted: function(){
  var ref = this
  Event.$on('vue-tables.pagination', function(data) {   
    ref.showMore()
    ref.$refs.table.setPage(data)
  })
},

Vue-tables-2

Eddy Valencia
  • 55
  • 1
  • 1
  • 6

2 Answers2

1

I think vue-tables.pagination event is not working properly for your code.First of all you have to create one data property which will store your current page.Store number of page on which you performed your last action.Then set page to that data property.

1

SetPage takes in number of the page, not page data.

artoju
  • 1,612
  • 12
  • 12