re-initializing the plugin with total pages from AJAX request and 'page' event gets called during that Edit
norey opened this issue · 4 comments
I'm trying the following, http://bpaste.net/show/Dnsgy9pbPbk8bzqbb4hA/ but after the 'click' event, the 'page' event gets called (thus having two AJAX requests after each other), any idea why ? I can't initialize bootpag outside the event since I don't know the number of pages in advance, that's why I get them from an AJAX request. Is there a solution for this?
I am still having the same issue even with the update, can you check if I am doing something wrong ?
Same issue for me, except I'm using the keyup event of an input to get json.
I resolved this using the following (@collection is a Backbone.Collection)
pag.on "page", (event, num) =>
if num != @collection.page
console.log "Paginating"
@collection.page = num # Load next page
@collection.fetch()
Same issue for me...
I trying to update the page total but the "page" event gets called. :/
Any Solution?
Why wont he fix this problem!
fixed in 1.0.5, see first example for help