fix(widget-list): when single field value is object widget (#2387)
* fix list widget field * ignore sub list widget
This commit is contained in:
parent
002cdd77a8
commit
90748ff4fe
@ -245,8 +245,11 @@ export default class ListControl extends React.Component {
|
||||
return (fieldName, newValue, newMetadata) => {
|
||||
const { value, metadata, onChange, field } = this.props;
|
||||
const collectionName = field.get('name');
|
||||
const newObjectValue =
|
||||
this.getValueType() !== valueTypes.SINGLE
|
||||
const listFieldObjectWidget = field.getIn(['field', 'widget']) === 'object';
|
||||
const withNameKey =
|
||||
this.getValueType() !== valueTypes.SINGLE ||
|
||||
(this.getValueType() === valueTypes.SINGLE && listFieldObjectWidget);
|
||||
const newObjectValue = withNameKey
|
||||
? this.getObjectValue(index).set(fieldName, newValue)
|
||||
: newValue;
|
||||
const parsedMetadata = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user