1
0
Fork 0
mirror of synced 2024-08-15 10:01:34 +12:00

Merge pull request #4950 from mslourens/enforce_display_column_validation

fetch the table which contains info about the primaryDisplay
This commit is contained in:
Martin McKeaveney 2022-03-22 08:31:48 +00:00 committed by GitHub
commit b51191fef9

View file

@ -17,6 +17,7 @@
let table let table
$: fetchSchema(dataSource) $: fetchSchema(dataSource)
$: fetchTable(dataSource)
// Returns the closes data context which isn't a built in context // Returns the closes data context which isn't a built in context
const getInitialValues = (type, dataSource, context) => { const getInitialValues = (type, dataSource, context) => {
@ -74,6 +75,16 @@
} }
} }
const fetchTable = async dataSource => {
if (dataSource?.tableId) {
try {
table = await API.fetchTableDefinition(dataSource.tableId)
} catch (error) {
table = null
}
}
}
$: initialValues = getInitialValues(actionType, dataSource, $context) $: initialValues = getInitialValues(actionType, dataSource, $context)
$: resetKey = Helpers.hashString( $: resetKey = Helpers.hashString(
JSON.stringify(initialValues) + JSON.stringify(schema) JSON.stringify(initialValues) + JSON.stringify(schema)