Skip to content

Commit

Permalink
fix(paginator): fixs from comments
Browse files Browse the repository at this point in the history
  • Loading branch information
malegreIndec committed Jan 2, 2024
1 parent 54839b8 commit 6c7536a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/Pagination/Pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Pagination = ({
const hasArrowRight = Math.max(...pages) < totalPages;
const hasArrowLeft = Math.min(...pages) > 1;

const handleChangeInput = value => { setSearch(Number(value) || "")};
const handleChangeInput = value => setSearch(Number(value) || "");

const handleMoveLeft = () => {
const pagesNumbers = getPagesNumber(pages);
Expand Down Expand Up @@ -59,9 +59,7 @@ const Pagination = ({
}
};

const handleBlur = () => {
!Number.isNaN(search) && setSearch(1)
};
const handleBlur = () => !Number.isNaN(search) && setSearch(1);

useEffect(() => {
setPages(getPagesRange(null, currentPage, totalPages) || []);
Expand Down

0 comments on commit 6c7536a

Please sign in to comment.