Fix(Popconfirm): confirm and cancel not trigger onVisibleChange

This commit is contained in:
afc163 2016-03-13 16:49:05 +08:00
parent d393f496ff
commit 38baf0ef19

View File

@ -56,12 +56,12 @@ export default React.createClass({
},
onVisibleChange(visible) {
this.setVisible(visible);
this.props.onVisibleChange(visible);
},
setVisible(visible) {
if (!('visible' in this.props)) {
this.setState({ visible });
}
this.props.onVisibleChange(visible);
},
render() {
const { title, okText, cancelText, placement, overlayStyle, trigger, ...restProps } = this.props;