From b5e6c16e496e04bf749c8d2fdbaaa5691814333a Mon Sep 17 00:00:00 2001 From: tim Date: Thu, 15 Feb 2024 09:54:19 +0000 Subject: [PATCH] fix page goto for page 1 --- src/npm-fastui-bootstrap/src/pagination.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/npm-fastui-bootstrap/src/pagination.tsx b/src/npm-fastui-bootstrap/src/pagination.tsx index ed32fe68..fa9e11bb 100644 --- a/src/npm-fastui-bootstrap/src/pagination.tsx +++ b/src/npm-fastui-bootstrap/src/pagination.tsx @@ -82,12 +82,7 @@ const PaginationLink: FC = ({ Display, ariaLabel, locked, active, page }) ) } const className = renderClassName({ 'page-link': true, disabled: locked && !active, active } as models.ClassName) - let onClick: models.GoToEvent - if (page === 1) { - onClick = { type: 'go-to', query: {} } - } else { - onClick = { type: 'go-to', query: { page } } - } + const onClick: models.GoToEvent = { type: 'go-to', query: { page } } return (