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

No current class if on first page #33

Closed
andrewpros opened this issue Feb 4, 2014 · 2 comments
Closed

No current class if on first page #33

andrewpros opened this issue Feb 4, 2014 · 2 comments

Comments

@andrewpros
Copy link

Hi.

When on first page result, the current link for 1st page has no "current" class applied.

Found this in Pages.cs 81 line

if (i == currentPage || (currentPage <= 0 && i == 0))
{
model.PaginationLinks.Add(new PaginationLink { Active = true, PageIndex = i, IsCurrent = true, DisplayText = i.ToString() });
}

Changed to

if (i == currentPage || (currentPage <= 0 && i == 1))

Works, but don't know if it is the right place to fix it.

@martijnboland
Copy link
Owner

Looks like a bug indeed, but it probably never got noticed because it only happens when currentPage is 0 and this doesn't happen in the demos.

@andrewpros
Copy link
Author

ROTFL, but happens on every production page, when you have the first page.

Do you created it for usage in demos only?

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