Fix button click arguments

pull/1058/head 0.12.4
afc163 9 years ago
parent 19c5b29c07
commit c3014c26a1

@ -30,13 +30,13 @@ export default class Button extends React.Component {
window.PIE.attach(findDOMNode(this)); window.PIE.attach(findDOMNode(this));
} }
} }
handleClick() { handleClick(...args) {
const buttonNode = findDOMNode(this); const buttonNode = findDOMNode(this);
buttonNode.className = buttonNode.className.replace(`${prefix}clicked`, ''); buttonNode.className = buttonNode.className.replace(`${prefix}clicked`, '');
setTimeout(() => { setTimeout(() => {
buttonNode.className += ` ${prefix}clicked`; buttonNode.className += ` ${prefix}clicked`;
}, 10); }, 10);
this.props.onClick(); this.props.onClick(...args);
} }
render() { render() {
const props = this.props; const props = this.props;

Loading…
Cancel
Save