How to extend PagingType options
How to extend PagingType options
kmd1970
Posts: 36Questions: 8Answers: 1
I am trying to extend the Datatables pagingType:
options to include my custom "full_numbers_icons" option.
(this will be used to trigger showing [< first] [<< previous] [next >>] [last >] arrow icons in paging toolbar buttons.
This code is used to set defaults in Datatables.bootstrap.js :
$.extend( true, DataTable.defaults, {
dom:
"<'ui two column grid'<'left aligned column'l><'right aligned column'f>>" +
"<'ui grid'<'column'tr>>" +
"<'ui two column stackable grid'<'left aligned four wide column'i><'right aligned twelve wide column'p>>",
renderer: 'semantic'
} );
Here is my attempt to add to the pager types, however I keep getting errors for function TypeError: _numbers is not a function
:
$.extend( DataTable.ext.pager, {
full_numbers_icons: function ( page, pages ) {
return [ 'first', 'previous', _numbers(page, pages), 'next', 'last' ];
}
});
This discussion has been closed.
Answers
Solution found?
Simply copy
full_numbers
function(), since they are essentially the same.