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

Current Page number is not highlighted #190

Closed
sourcebits-jayaprakash opened this issue Aug 27, 2017 · 2 comments
Closed

Current Page number is not highlighted #190

sourcebits-jayaprakash opened this issue Aug 27, 2017 · 2 comments

Comments

@sourcebits-jayaprakash
Copy link

Hi Michael ,

We have used this plugin for one my demo application using ionic framework, we were able to successfully implement the pagination but unfortunately we are not able to see the current page highlighted or in active state of the pagination controls. Below is the code snippet:
Kindly please guide us how to implement the current page in active state mode/ highlighted.

Thanks
Jayaprakash

=======

Angular version: 4

ngx-pagination version: "3.0.1"

Description of issue: Current Page is not highlighted.

Steps to reproduce: Render a page with items more than itemsPerPage and pagination appears but the current page is not highlighted

Expected result: Current page e.g. page number "1" should be highlighted or in active state.

Actual result: All page number in the pagination controls looks the same.

Any relevant code:

.ngx-pagination {
    padding: 0;
    margin: 0 0 10px;
    text-align: center;
    .show-for-sr {
        background: #0071C6;
    }
}

    <pagination-controls *ngIf="p>0" id="1" (pageChange)="getPage($event)"
      directionLinks="true"
                      previousLabel="Previous"
                      nextLabel="Next"
      autoHide="true">
</pagination-controls>

@michaelbromley
Copy link
Owner

Hi,

I notice that you have some custom styling there. Does the highlighting problem also occur when you don't add custom styling to the pagination controls?

Is there any way you can provide a reproduction of the issue? I have never used Ionic before so I don't have any specific insight if it is something to do with that.

@sourcebits-jayaprakash
Copy link
Author

Hi Michael,

Thanks for the help and immediate response, the problem of current page was not highlighted was because currentpage was passed as string instead of number of rectifying it i.e. convert it from string to number. The issue got resolved.
Regards
Jayaprakash

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

2 participants