fix(widget-list): validate string values in list widget (#2385)
This commit is contained in:
committed by
Shawn Erquhart
parent
e6f24d47ec
commit
814aa5091b
@ -18,7 +18,9 @@ export default class ControlPane extends React.Component {
|
|||||||
if (!wrappedControl) return;
|
if (!wrappedControl) return;
|
||||||
const name = field.get('name');
|
const name = field.get('name');
|
||||||
const widget = field.get('widget');
|
const widget = field.get('widget');
|
||||||
if (widget === 'list' || widget === 'object') {
|
const listFields = field => field.get('field') || field.get('fields') || field.get('types');
|
||||||
|
|
||||||
|
if ((widget === 'list' && listFields(field)) || widget === 'object') {
|
||||||
this.componentValidate[name] = wrappedControl.innerWrappedControl.validate;
|
this.componentValidate[name] = wrappedControl.innerWrappedControl.validate;
|
||||||
} else {
|
} else {
|
||||||
this.componentValidate[name] = wrappedControl.validate;
|
this.componentValidate[name] = wrappedControl.validate;
|
||||||
|
Reference in New Issue
Block a user