X.PagedList icon indicating copy to clipboard operation
X.PagedList copied to clipboard

FunctionToTransformEachPageLink

Open hn1 opened this issue 3 years ago • 0 comments

We are trying to use the FunctionToTransformEachPageLink but it does not work. Here is the following code: (P.S. on the li we also do not egt the option of InnerHTML. The resulting render for each li looks something like this: Microsoft.AspNetCore.Mvc.Rendering.TagBuilder i.e. the class name as opposed to a Html li element and anchor

new PagedListRenderOptions
        {
            MaximumPageNumbersToDisplay = 10,
            Display = PagedListDisplayMode.IfNeeded,
            LiElementClasses = new string[] { "pagination" },
            NextElementClass = "next",
            LinkToPreviousPageFormat = "❮",
            LinkToNextPageFormat = "❯",
            LinkToFirstPageFormat = "❮❮",
            LinkToLastPageFormat = "❯❯",
            FunctionToTransformEachPageLink = (li, a) =>
            {
                a.AddCssClass("next");
                li.SetInnerText(a.ToString());
                return li;

            }
        })

hn1 avatar May 14 '21 14:05 hn1