mirror of
https://github.com/ascribe/onion.git
synced 2024-12-31 09:07:48 +01:00
Also execute child's handleSuccess()
instead of just overwriting it in ModalWrapper
This commit is contained in:
parent
089c4ad009
commit
311d03d09c
@ -46,7 +46,13 @@ let ModalWrapper = React.createClass({
|
||||
renderChildren() {
|
||||
return ReactAddons.Children.map(this.props.children, (child) => {
|
||||
return ReactAddons.addons.cloneWithProps(child, {
|
||||
handleSuccess: this.handleSuccess
|
||||
handleSuccess: (response) => {
|
||||
if (typeof child.props.handleSuccess === 'function') {
|
||||
child.props.handleSuccess(response);
|
||||
}
|
||||
|
||||
this.handleSuccess(response);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user