Skip to content

Commit cae9a53

Browse files
committed
Fixed bug with onClick on button component
1 parent 134e64b commit cae9a53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/Button.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface IButtonProps {
1717
}
1818

1919
export default class Button extends React.Component<IButtonProps> {
20-
onClick() {
20+
onClick = () => {
2121
if (!this.props.disabled && this.props.onClick) {
2222
this.props.onClick();
2323
}

0 commit comments

Comments
 (0)