fix(widget-relation): fix initial relation widget preview (#2090)

This commit is contained in:
Bartholomew 2019-02-13 16:17:32 +01:00 committed by Shawn Erquhart
parent d9043b4a66
commit aff9c1a70a

View File

@ -10,7 +10,11 @@ class PreviewHOC extends React.Component {
*/
shouldComponentUpdate(nextProps) {
const isWidgetContainer = ['object', 'list'].includes(nextProps.field.get('widget'));
return isWidgetContainer || this.props.value !== nextProps.value;
return (
isWidgetContainer ||
this.props.value !== nextProps.value ||
this.props.fieldsMetaData !== nextProps.fieldsMetaData
);
}
render() {