Records Per Page Option Change Does Not Refresh Data Table

25 views
Skip to first unread message

TMP

unread,
Apr 1, 2016, 4:20:28 PM4/1/16
to yui-support

Hello, i'm using the gallery-paginator-view with server side pagination with YUI3 version 3.11.0.  We have several records per page option available in the data grid below. However, when the user is on page #1 and they select the 'All' or any of the option at 25 or after, the data in the data table does not get refreshed.  It only refreshes when the user is currently on page #2 or greater if they where to change the # of record per page option.

Any ideas on what is causing this? Below is a sniplet of code that we are using.

Tri



Code Sniplet
-------------------
.....

  var pmodel = new Y.PaginatorModel({
  page:           1,
  itemsPerPage:   10,
  totalItems:     1
     });

    var pg =  new Y.PaginatorView({
         model:              pmodel,
         container:          '#casummary_paginator',
         paginatorTemplate:  '#tmpl-basic-C',
         maxPageLinks:       12,
         pageOptions:        [ 10, 25, 100, 500, 'All' ],
         pageLinkTemplate:  '<a href="#" data-pglink="{page}" class="{pageLinkClass}"  title="Rows {pageStartIndex} to {pageEndIndex}">{page}</a>'
     }).render();

var randomVal = Math.random();
var casummaryReqQS = '&page={page}&itemsPerPage={itemsPerPage}&sortBy=&dataGroupNum=' + dataGroupNum + '&rand=' + randomVal + '&gridFilters=' + document.form1.gridFilters.value;

     var casummary_table = new Y.DataTable({
        columns:    casummary_cols,

// "selection" config stuff begins here ...
highlightMode: 'row',
selectionMulti: false,
paginator: pg,
requestStringTemplate: "&page={page}&itemsPerPage={itemsPerPage}&sortBy=&dataGroupNum=" + dataGroupNum + "&rand=" + randomVal + "&gridFilters=" + document.form1.gridFilters.value,
scrollable: 'y',
width: dataTableWidth
    });

    casummary_table.plug(  Y.Plugin.DataTableDataSource, {
        datasource:    casummary_ds,
        initialRequest: Y.Lang.sub( casummary_table.get('requestStringTemplate'),{
                page:           1,
                itemsPerPage:   casummary_table.paginator.model.get('itemsPerPage'),
                sortBy:         Y.JSON.stringify( casummary_table.get('sortBy') || {} ) || null
            })
    });

casummary_table.render('#casummary_table');

Reply all
Reply to author
Forward
0 new messages