[ 2 posts ]

Bren Joh

  • Username: Johbremat
  • Joined: Thu Sep 29, 2011 4:39 pm
  • Posts: 3
  • Offline
  • Profile

YUI 3.4 - Paginator - How to reset paginator on new search?

Post Posted: Thu Sep 29, 2011 5:07 pm
+0-
If a search returns sufficient results for for 3 pages to be displayed, 3 pages are displayed.

If a subsequent search returns sufficient results for for 10 pages to be displayed, 10 pages are displayed.

If a following search returns results for only a single page to be populated, 10 pages are still displayed (empty of records, but the number of pages doesn't reduce).


Code:
            on: {
               changeRequest: function(event) {
                  var instance = this;
                  var newState = event.state;
                  var page = newState.page;
                  if (newState.before) {
                     var lastPage = newState.before.page;
                      $('contentPage').hide();
                  }
                  paginateCallback(page);
                  $('contentPage').show();
                  instance.setState(newState);
               }



Any help?

John Lindal

YUI Contributor

  • Username: jafl
  • Joined: Mon Nov 02, 2009 2:33 pm
  • Posts: 352
  • Location: Los Angeles, CA
  • Twitter: jafl5272
  • GitHub: jafl
  • Gists: jafl
  • Offline
  • Profile

Re: YUI 3.4 - Paginator - How to reset paginator on new sear

Post Posted: Mon Oct 03, 2011 6:53 am
+0-
Which paginator are you using from the YUI Gallery?
  [ 2 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum