mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
enable overriding of editable prop for property
This commit is contained in:
parent
495f5600af
commit
215f251845
@ -207,7 +207,10 @@ let Form = React.createClass({
|
|||||||
return ReactAddons.addons.cloneWithProps(child, {
|
return ReactAddons.addons.cloneWithProps(child, {
|
||||||
handleChange: this.handleChangeChild,
|
handleChange: this.handleChangeChild,
|
||||||
ref: child.props.name,
|
ref: child.props.name,
|
||||||
editable: !this.props.disabled
|
|
||||||
|
// We need this in order to make editable be overridable when setting it directly
|
||||||
|
// on Property
|
||||||
|
editable: typeof child.props.editable !== 'undefined' ? child.props.editable : !this.props.disabled
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user