We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This issue is still relevant.
The text was updated successfully, but these errors were encountered:
Please, try to use my pull request to racer. It is working for me for reactive pagination, wanna to know your feelings
My paginator component:
class CardsList_Paginator create: (model) -> model.start 'pages', model.scope('_page.cards_count'), model.scope('_session.cards_in_page'), (cards_count, cards_in_page) -> last = Math.ceil cards_count / cards_in_page last = 1 if last == 0 [0..last - 1] previousPage: (ev) -> page = app.model.get '_session.page_index' page -= 1 page = 0 if page < 0 @gotoPage ev, page nextPage: (ev) -> page = app.model.get '_session.page_index' page = 1 unless page page += 1 last = @model.get 'pages' last = last[last.length - 1] page = last if page > last @gotoPage ev, page gotoPage: (ev, page) -> app.model.set '_session.page_index', page body = $ "html, body" body.animate { scrollTop:0 }, '500', 'swing' do ev.preventDefault
and view (bootstrap 3)
paginator: ul.pagination(class='{{if !pages || pages.length == 1}}hidden{{/}}') li a(href="#" aria-label="Previous" on-click='previousPage($event)') span(aria-hidden="true") « each pages as #page li a(href="#" on-click='gotoPage($event, #page)') {{#page + 1}} li a(href="#" aria-label="Next" on-click='nextPage($event)') span(aria-hidden="true") »
May be it is not a best solution, but it is working. Want to know your opinion
Sorry, something went wrong.
No branches or pull requests
This issue is still relevant.
The text was updated successfully, but these errors were encountered: