Merge pull request #12293 from Budibase/budi-7736-relationship-picker-required-validation-fires-immediately

Don't trigger required validation early
This commit is contained in:
Martin McKeaveney 2023-11-06 18:11:07 +00:00 committed by GitHub
commit 3b5a9e0057
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -137,7 +137,9 @@
typeof value === "object" ? value._id : value typeof value === "object" ? value._id : value
) )
// Make sure field state is valid // Make sure field state is valid
fieldApi.setValue(values) if (values?.length > 0) {
fieldApi.setValue(values)
}
return values return values
} }