Make object control pure (no extra imports). (#1446)
This commit is contained in:
parent
e5b8af9f4d
commit
cc4dc43898
@ -6,7 +6,6 @@ import { partial } from 'lodash';
|
|||||||
import c from 'classnames';
|
import c from 'classnames';
|
||||||
import { resolveWidget } from 'Lib/registry';
|
import { resolveWidget } from 'Lib/registry';
|
||||||
import { Icon } from 'UI';
|
import { Icon } from 'UI';
|
||||||
import EditorControl from 'Editor/EditorControlPane/EditorControl';
|
|
||||||
|
|
||||||
const TopBar = ({ collapsed, onCollapseToggle }) => (
|
const TopBar = ({ collapsed, onCollapseToggle }) => (
|
||||||
<div className="nc-objectControl-topBar">
|
<div className="nc-objectControl-topBar">
|
||||||
@ -35,6 +34,7 @@ export default class ObjectControl extends Component {
|
|||||||
forID: PropTypes.string,
|
forID: PropTypes.string,
|
||||||
classNameWrapper: PropTypes.string.isRequired,
|
classNameWrapper: PropTypes.string.isRequired,
|
||||||
forList: PropTypes.bool,
|
forList: PropTypes.bool,
|
||||||
|
editorControl: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
@ -67,6 +67,7 @@ export default class ObjectControl extends Component {
|
|||||||
getAsset,
|
getAsset,
|
||||||
value,
|
value,
|
||||||
onChangeObject,
|
onChangeObject,
|
||||||
|
editorControl: EditorControl,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
if (field.get('widget') === 'hidden') {
|
if (field.get('widget') === 'hidden') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user