Hello, I'm adding a status dialog using blockUI to my data table when it gets loaded initially and with each page navigate. The code below works for our version of the YUI3 datatable that uses gallery-paginator-view with server side pagination. However, i'm having trouble getting the 'dataChange' event to be triggered when the datatable has finished rendering itself using a more basic client-side pagination of YUI3. I'm using YUI3 version 3.11.0.
Does anyone know what event gets fired when the datatable finishes rendering? I believe this part of the code is not being triggered with the default, client-side pagination.
Thanks.
........
// Paginator
function updatePaginator(
/* object */ state)
{
this.setRowsPerPage(state.rowsPerPage, true);
sendRequest();
}
var pg = new Y.Paginator(
{
totalRecords: 100,
rowsPerPage: 100,
template: '{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} <span class="rpp">Rows per page:</span> {RowsPerPageDropdown}',
rowsPerPageOptions: [25,100,500],
firstPageLinkLabel: '|<',
previousPageLinkLabel: '<',
nextPageLinkLabel: '>',
lastPageLinkLabel: '>|'
});
pg.on('changeRequest', updatePaginator);
pg.render('#pg');
ds.on('response', function(e)
{
pg.setTotalRecords(e.response.meta.totalRecords, true);
pg.render();
});
var table = new Y.DataTable({
columns: cols,
data: data,
// "selection" config stuff begins here ...
highlightMode: 'row',
selectionMulti: false,
scrollable: 'y',
width: document.body.clientWidth-25+'px'
});
table.plug(Y.Plugin.DataTableDataSource, {datasource: ds});
table.render('#table');
sendRequest();
var sasummaryBlockId = 'table';
pg.after('pageChange', function (e) {
jqShowWaitPanelElement(sasummaryBlockId);
});
table.after('dataChange', function() {
jqHideWaitPanelElement(sasummaryBlockId);
});
jqShowWaitPanelElement(sasummaryBlockId);