cast page value to number when inputing a custom page number (#10370)

This commit is contained in:
Kartik Gupta 2024-07-22 14:32:51 +05:30 committed by GitHub
parent f905f96299
commit e1208343bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -127,7 +127,8 @@ export const Pagination = function Pagination({
className={`form-control h-100`}
value={pageIndex}
onChange={(event) => {
if (event.target.value <= pageCount) gotoPage(event.target.value);
const value = Number(event.target.value);
if (value <= pageCount) gotoPage(value);
}}
/>
<span