fix pagination click event
This commit is contained in:
parent
231b9ee5bf
commit
effba662a0
|
|
@ -6,7 +6,7 @@ interface Props {
|
|||
onClick?(): void
|
||||
}
|
||||
|
||||
const PaginationItem: React.FC<Props> = props => {
|
||||
const PaginationItem: React.FC<Props> = (props) => {
|
||||
const classes = ['page-item']
|
||||
if (props.active) {
|
||||
classes.push('active')
|
||||
|
|
@ -15,7 +15,8 @@ const PaginationItem: React.FC<Props> = props => {
|
|||
classes.push('disabled')
|
||||
}
|
||||
|
||||
const handleClick = () => {
|
||||
const handleClick = (event: React.MouseEvent) => {
|
||||
event.preventDefault()
|
||||
if (!props.disabled && props.onClick) {
|
||||
props.onClick()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user