Skip to content

Commit e1203d6

Browse files
authored
fix page goto for page 1 (#195)
1 parent fce7be8 commit e1203d6

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/npm-fastui-bootstrap/src/pagination.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,7 @@ const PaginationLink: FC<Link> = ({ Display, ariaLabel, locked, active, page })
8282
)
8383
}
8484
const className = renderClassName({ 'page-link': true, disabled: locked && !active, active } as models.ClassName)
85-
let onClick: models.GoToEvent
86-
if (page === 1) {
87-
onClick = { type: 'go-to', query: {} }
88-
} else {
89-
onClick = { type: 'go-to', query: { page } }
90-
}
85+
const onClick: models.GoToEvent = { type: 'go-to', query: { page } }
9186
return (
9287
<li className="page-item">
9388
<components.LinkRender onClick={onClick} className={className} locked={locked || active} ariaLabel={ariaLabel}>

0 commit comments

Comments
 (0)