sorting on documents

This commit is contained in:
2022-01-31 20:11:31 +00:00
parent 3cecafc380
commit 2ec88c995c
15 changed files with 240 additions and 70 deletions
+17 -4
View File
@@ -4,6 +4,8 @@ import useTranslation from "next-translate/useTranslation";
const PaginationControl = (props) => {
const {
orderBy,
fieldSort,
searchString,
searchResultsObj,
currentPage,
@@ -82,7 +84,11 @@ const PaginationControl = (props) => {
className="govuk-body govuk-link govuk-!-font-weight-bold govuk-link--no-underline activePaginationItem leftTextButton"
onClick={() => {
spinnerState(),
getDocumentResults(currentPage - 1);
getDocumentResults(
currentPage - 1,
orderBy,
fieldSort
);
}}
>
{t("common:previous-link-button")}
@@ -115,8 +121,11 @@ const PaginationControl = (props) => {
key={i}
onClick={() => {
spinnerState();
console.log(i + 1);
getDocumentResults(i + 1);
getDocumentResults(
i + 1,
orderBy,
fieldSort
);
}}
>
{e}
@@ -130,7 +139,11 @@ const PaginationControl = (props) => {
className="govuk-body govuk-link govuk-!-font-weight-bold govuk-link--no-underline activePaginationItem rightTextButton"
onClick={() => {
spinnerState(),
getDocumentResults(currentPage + 1);
getDocumentResults(
currentPage + 1,
orderBy,
fieldSort
);
}}
>
{t("common:next-link-button")}