Fix Vector getValues (#7071)
This commit is contained in:
parent
0f14ce32a0
commit
03cf9b49de
@ -36,11 +36,13 @@ export function getParams (inputParams: ParamDef[], prev: ParamDef[], max: numbe
|
||||
}
|
||||
|
||||
export function getValues ({ value }: RawParam): RawParam[] {
|
||||
return (value as RawParam[] || []).map((value: RawParam) =>
|
||||
isUndefined(value) || isUndefined(value.isValid)
|
||||
? { isValid: !isUndefined(value), value }
|
||||
: value
|
||||
);
|
||||
return Array.isArray(value)
|
||||
? value.map((value: RawParam) =>
|
||||
isUndefined(value) || isUndefined(value.isValid)
|
||||
? { isValid: !isUndefined(value), value }
|
||||
: value
|
||||
)
|
||||
: [];
|
||||
}
|
||||
|
||||
function Vector ({ className = '', defaultValue, isDisabled = false, label, onChange, overrides, registry, type, withLabel }: Props): React.ReactElement<Props> | null {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user