0
0
Fork 0

Merge pull request 'refs #5509 fix(FormModel) $props.formInitialData' (!218) from warmFix-claimBasicData into test

Reviewed-on: verdnatura/salix-front#218
Reviewed-by: Pablo Natek <pablone@verdnatura.es>
This commit is contained in:
Alex Moreno 2024-03-01 08:55:11 +00:00
commit 7a9188317b
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>