sorting on documents
This commit is contained in:
@@ -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")}
|
||||
|
||||
Reference in New Issue
Block a user