fix: broken preview (#2245)
This commit is contained in:
parent
c3374a540a
commit
4db497b496
@ -194,7 +194,10 @@ export default class Widget extends Component {
|
|||||||
*/
|
*/
|
||||||
onChangeObject = (fieldName, newValue, newMetadata) => {
|
onChangeObject = (fieldName, newValue, newMetadata) => {
|
||||||
const newObjectValue = this.getObjectValue().set(fieldName, newValue);
|
const newObjectValue = this.getObjectValue().set(fieldName, newValue);
|
||||||
return this.props.onChange(newObjectValue, { [this.props.field.get('name')]: newMetadata });
|
return this.props.onChange(
|
||||||
|
newObjectValue,
|
||||||
|
newMetadata && { [this.props.field.get('name')]: newMetadata },
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user