Skip to content

Commit

Permalink
fix(Pagination): fixes input onChange for value 0
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya-kumawat committed Sep 18, 2020
1 parent e3e103a commit e1e8fd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/components/molecules/pagination/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const Pagination = (props: PaginationProps) => {
const inputChangeHandler = (e: React.ChangeEvent<HTMLInputElement>) => {
e.preventDefault();

const val = parseInt(e.target.value.trim(), 10);
const val = +e.target.value.trim();
if (val >= 0 && val <= totalPages) {
if (!init) setInit(true);
setPage(val);
Expand Down

0 comments on commit e1e8fd4

Please sign in to comment.