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:
parent
495f5600af
commit
215f251845
@ -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
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user