Skip to content

Commit

Permalink
fix page goto for page 1 (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-x-y-z authored Feb 26, 2024
1 parent fce7be8 commit e1203d6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/npm-fastui-bootstrap/src/pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,7 @@ const PaginationLink: FC<Link> = ({ 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 (
<li className="page-item">
<components.LinkRender onClick={onClick} className={className} locked={locked || active} ariaLabel={ariaLabel}>
Expand Down

0 comments on commit e1203d6

Please sign in to comment.