Merge pull request #15440 from Budibase/BUDI-8986/validate-screen-datasources-fields

Validate screen field datasource settings
This commit is contained in:
Adria Navarro 2025-01-27 13:04:00 +01:00 committed by GitHub
commit 7c17d01efe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -33,6 +33,7 @@ const validationKeyByType: Record<UIDatasourceType, string | null> = {
query: "_id", query: "_id",
custom: null, custom: null,
link: "rowId", link: "rowId",
field: "value",
} }
export const screenComponentErrors = derived( export const screenComponentErrors = derived(
@ -72,6 +73,7 @@ export const screenComponentErrors = derived(
"rowId", "rowId",
bindings.extractRelationships(componentBindings) bindings.extractRelationships(componentBindings)
), ),
...reduceBy("value", bindings.extractFields(componentBindings)),
} }
const resourceId = componentSettings[validationKey] const resourceId = componentSettings[validationKey]

View File

@ -5,3 +5,4 @@ export type UIDatasourceType =
| "query" | "query"
| "custom" | "custom"
| "link" | "link"
| "field"