Allow null/empty values in Dropdown widget options (#3533)
This commit is contained in:
parent
5acf2c3238
commit
7c994da6e9
|
|
@ -395,9 +395,7 @@ export const VALIDATORS: Record<ValidationType, Validator> = {
|
|||
const isValidOption = (option: { label: any; value: any }) =>
|
||||
_.isObject(option) &&
|
||||
_.isString(option.label) &&
|
||||
_.isString(option.value) &&
|
||||
!_.isEmpty(option.label) &&
|
||||
!_.isEmpty(option.value);
|
||||
!_.isEmpty(option.label);
|
||||
|
||||
const hasOptions = every(parsed, isValidOption);
|
||||
const validOptions = parsed.filter(isValidOption);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user