Updated ListItem onClick handler

• Updated:
- ListItem onClick handler
This commit is contained in:
mgabdev 2020-08-07 17:42:44 -05:00
parent 0295330eba
commit 9482a61c05
1 changed files with 7 additions and 1 deletions

View File

@ -28,6 +28,12 @@ export default class ListItem extends PureComponent {
hideArrow: PropTypes.bool,
}
handleOnClick = (e) => {
if (!!this.props.onClick) {
this.props.onClick(e)
}
}
render() {
const {
title,
@ -102,7 +108,7 @@ export default class ListItem extends PureComponent {
<Button
to={to}
href={href}
onClick={onClick}
onClick={!!onClick ? this.handleOnClick : undefined}
className={containerClasses}
noClasses
>