DataTablePagerComponent custom number of displayed pages.
See original GitHub issueI’m submitting a … (check one with “x”)
[ ] bug report => search github for a similar issue or PR before submitting
[x ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter
Current behavior DataTablePagerComponent can’t be configured to display custom number of pages. Currently it’s hardcoded to display 5 pages always.
const maxSize = 5;
Expected behavior User should be able to set a custom number of elements to be displayed which fits his project requirements.
I already implemented it in my current project by adding a variable which can be passed from the template. If anyone interested I can create a pull request.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:12
- Comments:30 (12 by maintainers)
Top Results From Across the Web
DataTables example - Alternative pagination
There are six built-in options for which pagination controls DataTables should show: numbers - Page number buttons only; simple - 'Previous' and 'Next' ......
Read more >Customize ngx-datatable pager component to show Text ...
I am Customizing the datatable-pager in ngx ...
Read more >Angular Ngx Datatable Custom Paginator (forked)
Example of ngx-datatable custom paginator with variable count of visible pages.
Read more >Examples › Pagination | Mantine DataTable - GitHub Pages
page → the current page number · onPageChange → a callback that is executed when the user changes the current page · totalRecords...
Read more >Bootstrap 4 table pagination - examples & tutorial.
By default, pagination is initialized with Previous, page numbers and Next buttons. To manipulate the table pagination we can use one of the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mvhecke here’s an example:
Pager displays 5 pages and it’s okay when you only have pagination in the footer. But what if we need extra information there?
Well, it seems logical to reduce pager’s width so it doesn’t take 1/3 of footer’s width.
Another use case is a mobile layout where viewport width causes default pager to wrap.
@rahul-winner sure, here’s working example: https://plnkr.co/edit/ym689j You can create custom footer template and move select element there: