Skip to content

Commit

Permalink
passed in usersearch query string for pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKevJoy committed Sep 29, 2023
1 parent ef0c261 commit 2349c24
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<govuk-pagination>
@if (Model.PreviousPage.HasValue)
{
<govuk-pagination-previous asp-page="Users" asp-all-route-data="@Model.GetPage((int)Model.PreviousPage!)"/>
<govuk-pagination-previous asp-page="Users" asp-all-route-data="@Model.GetPage((int)Model.PreviousPage!)" asp-route-usersearch="@Model.UserSearch" />
}

@for (int i = 0; i < Model.PaginationPages!.Length; i++)
Expand All @@ -77,12 +77,12 @@
<govuk-pagination-ellipsis/>
}

<govuk-pagination-item asp-page="Users" asp-all-route-data=@Model.GetPage(item) is-current="@(item == Model.PageNumber)">@item</govuk-pagination-item>
<govuk-pagination-item asp-page="Users" asp-route-usersearch="@Model.UserSearch" asp-all-route-data=@Model.GetPage(item) is-current="@(item == Model.PageNumber)">@item</govuk-pagination-item>
}

@if (Model.NextPage.HasValue)
{
<govuk-pagination-next asp-page="Users" asp-all-route-data=@Model.GetPage((int)Model.NextPage!)/>
<govuk-pagination-next asp-page="Users" asp-all-route-data=@Model.GetPage((int)Model.NextPage!) asp-route-usersearch="@Model.UserSearch" />
}
</govuk-pagination>
}
Expand Down

0 comments on commit 2349c24

Please sign in to comment.