Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pagination control "next" is visble after page gets loaded even if there is no data present in tha table. #355

Open
ajinkyabapat1 opened this issue Apr 9, 2020 · 7 comments

Comments

@ajinkyabapat1
Copy link

Angular version: 7.2.15

ngx-pagination version:^3.2.1

Description of issue:

Pagination control "next " iss visble after the page gets loaded and even if there is no data presnt in table.

Steps to reproduce:

Expected result: next contol should be hidden similar to previous after page gets loaded for the first time. and if no data avaliable

Actual result: next control is visble after the application loaded for the first time <pagination-controls
id="listing_pagination"
maxSize=""
directionLinks="true"
(pageChange)="page = $event"
[autoHide]="false"
>

**Demo**: (if possible, edit [this StackBlitz demo](https://stackblitz.com/edit/angular-e1f9hq) and paste the link to your fork)

image

here after clciking on search i am getting data , but pagination "next" contol is visble before fetching the data in the table
Any relevant code:


@michaelbromley
Copy link
Owner

Hi, can you make a StackBlitz reproduction please? https://stackblitz.com/edit/angular-e1f9hq

@ajinkyabapat1
Copy link
Author

ajinkyabapat1 commented Apr 10, 2020 via email

@michaelbromley
Copy link
Owner

I don't mean you need to reveal proprietary code, just a minimal reproduction that demonstrates the issue. Otherwise I would have to create the reproduction myself in order to ascertain what the problem is. This may take some time as it is not a high priority for me right now.

@ajinkyabapat1
Copy link
Author

ajinkyabapat1 commented Apr 10, 2020 via email

@shubh48
Copy link

shubh48 commented Jul 8, 2020

Yes it is showing Next button visible but no data in table

@patidarpavan007
Copy link

same issue i am pursuing

@patidarpavan007
Copy link

Hello,

I have added a condition to handle that problem.
<pagination-controls *ngIf="myList?.length>0" (pageChange)="recordingHandlePageChange($event)">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants