1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 01:39:36 +01:00

enable overriding of editable prop for property

This commit is contained in:
Tim Daubenschütz 2015-08-19 18:09:37 +02:00
parent 495f5600af
commit 215f251845

View File

@ -207,7 +207,10 @@ let Form = React.createClass({
return ReactAddons.addons.cloneWithProps(child, {
handleChange: this.handleChangeChild,
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
});
}
});