From c3014c26a135db7ebaa8f3d80870dfe48b59ef57 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 23 Feb 2016 00:05:26 +0800 Subject: [PATCH] Fix button click arguments --- components/button/button.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/button/button.jsx b/components/button/button.jsx index 3692ce9cad..59111b7605 100644 --- a/components/button/button.jsx +++ b/components/button/button.jsx @@ -30,13 +30,13 @@ export default class Button extends React.Component { window.PIE.attach(findDOMNode(this)); } } - handleClick() { + handleClick(...args) { const buttonNode = findDOMNode(this); buttonNode.className = buttonNode.className.replace(`${prefix}clicked`, ''); setTimeout(() => { buttonNode.className += ` ${prefix}clicked`; }, 10); - this.props.onClick(); + this.props.onClick(...args); } render() { const props = this.props;