Skip to content

Commit 9ef5a5e

Browse files
author
Arthur Vivian
committed
pass correct arguments to onClick in BpkButton
1 parent 9e5ee00 commit 9ef5a5e

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

changelog.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
## UNRELEASED
44

5-
__Nothing yet...__
5+
**Fixed:**
6+
- bpk-component-button:
7+
- Fixed SyntheticEvent not being passed to the onClick handler.
68

79
## 2017-08-17 (2) - Fix a missing dependency in several components
810

packages/bpk-component-button/src/BpkButton.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ const BpkButton = (props) => {
7171

7272
// Due to React bug in Chrome, the onClick event fires even if the button is disabled.
7373
// Pull request is being worked on (as of 2016-12-22): https://github.com/facebook/react/pull/8329
74-
const onClickWrapper = onClick ? () => {
74+
const onClickWrapper = onClick ? (...args) => {
7575
if (!disabled) {
76-
onClick(...arguments);
76+
onClick(...args);
7777
}
7878
} : null;
7979

0 commit comments

Comments
 (0)