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

How to style X.PagedList.Core into Bootstrap 4.1? #127

Closed
MikeAlhayek opened this issue Nov 3, 2018 · 2 comments · Fixed by #134
Closed

How to style X.PagedList.Core into Bootstrap 4.1? #127

MikeAlhayek opened this issue Nov 3, 2018 · 2 comments · Fixed by #134

Comments

@MikeAlhayek
Copy link
Contributor

MikeAlhayek commented Nov 3, 2018

Thank you for this great package!

I am trying to use this package in ASP.NET Core package with Bootstrap 4.1.3.

This is what I have added to make it Bootstrap 4.1.3 ready..

@Html.PagedListPager(Model.Results, pageNumber => string.Format("{0}?PageSize={1}&Page={2}", Url.Action("Search"), Model.GetPageSize(), pageNumber), new X.PagedList.Mvc.Common.PagedListRenderOptionsBase
{
	DisplayItemSliceAndTotal = true,
	ContainerDivClasses = new[] { "navigation" },
	LiElementClasses = new[] { "page-item" },
	PageClasses = new[] { "page-link" },
})

However the above is showing the navigation like so

screenshot_3
screenshot_4

If the PagedListRenderOptionsBase has an option to allow me to add a class on the content of the "Showing...." and the "..." that would solve this issue.

@MikeAlhayek
Copy link
Contributor Author

Does anyone have a workaround?

@MikeAlhayek
Copy link
Contributor Author

I submitted a pull-request to permanently fix this issue.

However, as a workaround, you can add the following code using jquery

$(function(){
    $('ul.pagination > li.disabled > a').addClass('page-link');
});

a-gubskiy pushed a commit that referenced this issue Jan 14, 2019
Fix an issue #127 and adds example for Bootstrap 4.1+ support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant