Change form type setting to 'actionType' to avoid clashing with old settings
This commit is contained in:
parent
f586042267
commit
e5737987c5
|
@ -1026,7 +1026,7 @@
|
||||||
{
|
{
|
||||||
"type": "select",
|
"type": "select",
|
||||||
"label": "Type",
|
"label": "Type",
|
||||||
"key": "type",
|
"key": "actionType",
|
||||||
"options": ["Create", "Update"],
|
"options": ["Create", "Update"],
|
||||||
"defaultValue": "Create"
|
"defaultValue": "Create"
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
export let theme
|
export let theme
|
||||||
export let size
|
export let size
|
||||||
export let disabled = false
|
export let disabled = false
|
||||||
export let type = "Create"
|
export let actionType = "Create"
|
||||||
|
|
||||||
const component = getContext("component")
|
const component = getContext("component")
|
||||||
const context = getContext("context")
|
const context = getContext("context")
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use the closest data context as the initial form values
|
// Use the closest data context as the initial form values
|
||||||
const initialValues = getInitialValues(type, dataSource, $context)
|
const initialValues = getInitialValues(actionType, dataSource, $context)
|
||||||
|
|
||||||
// Form state contains observable data about the form
|
// Form state contains observable data about the form
|
||||||
const formState = writable({ values: initialValues, errors: {}, valid: true })
|
const formState = writable({ values: initialValues, errors: {}, valid: true })
|
||||||
|
|
Loading…
Reference in New Issue