0
0
Fork 0

refs #5509 fix(FormModel) $props.formInitialData

This commit is contained in:
Alex Moreno 2024-03-01 09:33:59 +01:00
parent 28dbc76fe6
commit 37160158ce
2 changed files with 2 additions and 2 deletions

View File

@ -81,7 +81,7 @@ onMounted(async () => {
});
// 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) {
await fetch();
}

View File

@ -111,7 +111,7 @@ function addDefaultData(data) {
<FormModelPopup
:title="formInitialData ? t('globals.edit') : t('globals.create')"
model="dms"
:form-initial-data="formInitialData"
:form-initial-data="formInitialData ?? {}"
:save-fn="save"
>
<template #form-inputs>