forked from verdnatura/salix-front
refs #5509 fix(FormModel) $props.formInitialData
This commit is contained in:
parent
28dbc76fe6
commit
37160158ce
|
@ -81,7 +81,7 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Podemos enviarle al form la estructura de data inicial sin necesidad de fetchearla
|
// Podemos enviarle al form la estructura de data inicial sin necesidad de fetchearla
|
||||||
state.set($props.model, $props.formInitialData ?? {});
|
state.set($props.model, $props.formInitialData);
|
||||||
if ($props.autoLoad && !$props.formInitialData) {
|
if ($props.autoLoad && !$props.formInitialData) {
|
||||||
await fetch();
|
await fetch();
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,7 @@ function addDefaultData(data) {
|
||||||
<FormModelPopup
|
<FormModelPopup
|
||||||
:title="formInitialData ? t('globals.edit') : t('globals.create')"
|
:title="formInitialData ? t('globals.edit') : t('globals.create')"
|
||||||
model="dms"
|
model="dms"
|
||||||
:form-initial-data="formInitialData"
|
:form-initial-data="formInitialData ?? {}"
|
||||||
:save-fn="save"
|
:save-fn="save"
|
||||||
>
|
>
|
||||||
<template #form-inputs>
|
<template #form-inputs>
|
||||||
|
|
Loading…
Reference in New Issue