Browse Source

Remove schema validation when inheriting initial values in forms

pull/2422/head
Andrew Kingston 5 years ago
parent
commit
dc62434f85
  1. 7
      packages/standard-components/src/forms/Form.svelte

7
packages/standard-components/src/forms/Form.svelte

@ -24,12 +24,9 @@
if (["user", "url"].includes(context.closestComponentId)) { if (["user", "url"].includes(context.closestComponentId)) {
return {} return {}
} }
// Only inherit values if the table ID matches // Always inherit the closest data source
const closestContext = context[`${context.closestComponentId}`] || {} const closestContext = context[`${context.closestComponentId}`] || {}
if (dataSource.tableId !== closestContext?.tableId) { return closestContext || {}
return {}
}
return closestContext
} }
$: initialValues = getInitialValues(actionType, dataSource, $context) $: initialValues = getInitialValues(actionType, dataSource, $context)

Loading…
Cancel
Save