I need conditional pagination on data-table, that is, need to add pagination only if the number of records is > say 5.
The reason is when the pagination is included in the data table, it occupies the space of a row on screen. In maximum cases, the number of rows would be 5 only. So, the intent is to save the screen space for these majority cases.
According to primefaces' documentation:
set dataTable paginator like this
paginator="true" rows="5" paginatorAlwaysVisible="false"
- the paginator will be visible only if there are more than 5 records in the table.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With