paginatorPosition not working
There is no guarantee in receiving a response in GitHub Issue Tracker, If you'd like to secure our response, you may consider PrimeNG PRO Support where support is provided within 4 business hours
I'm submitting a ... (check one with "x")
[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Plunkr Case (Bug Reports) Please fork the plunkr below and create a case demonstrating your bug report. Issues without a plunkr have much less possibility to be reviewed.
http://plnkr.co/edit/Qi2Nw2imLpDUF8NJinYw?p=preview
Current behavior
On p-dataTable component, if use [paginator]="true" paginator component shows at bottom of datatable, which is expected. However, if add, [paginatorPosition]="both" or [paginatorPosition]="top", the paginator component completely disappears even though the data is paginated.
Expected behavior
The following code in the html template should show the paginator at both the top and the bottom of the table. <p-dataTable [value]="items" [rows]="10" [paginator]="true" [paginatorPosition]="both">
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
- Angular version: 2.0.X
4.3.1
- PrimeNG version: 2.0.X
4.1.2
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Chrome (so far)
-
Language: [all | TypeScript X.X | ES6/7 | ES5]
-
Node (for AoT issues):
node --version=
You used wrong paginatorPosition
paginatorPosition="both" or [paginatorPosition]='both'
I hope it helps.
that makes sense - wow, I should've realized that :) So, it should be like this:
<p-dataTable [value]="items" [rows]="10" [paginator]="true" [paginatorPosition]="'both'">
I will try it later. Thanks
There is actually an error with paginatorPosition:
Current Code: *ngIf="paginator && paginatorPosition =='top' || paginatorPosition =='both'"
Should be: *ngIf="paginator && (paginatorPosition =='top' || paginatorPosition =='both)'"
If using "both" and paginator=false, pagination will still render
This is an easy fix. Can this be added to next minor release?