primefaces / primeui

Rich set of javascript-css only widgets
http://www.primefaces.org/primeui
285 stars 125 forks source link

Ability to add custom content in paginator #196

Closed cagataycivici closed 8 years ago

cagataycivici commented 8 years ago

Added contentLeft and contentRight properties to paginator config, these are functions to return dom elements.

$('#tbllocal').puidatatable({
                caption: 'Client Side Pagination with Local Data',
                paginator: {
                    rows: 5,
                    contentLeft: function() {
                        return $('<button>Button at Left side</button>');
                    },
                    contentRight: function() {
                        return $('<button>Button at Right side</button>');
                    }
                },
                columns: [
                    {field: 'vin', headerText: 'Vin'},
                    {field: 'brand', headerText: 'Brand'},
                    {field: 'year', headerText: 'Year'},
                    {field: 'color', headerText: 'Color'}
                ],
                datasource: localData
            });