Merge pull request 'refs #5509 fix(FormModel) $props.formInitialData' (!218) from warmFix-claimBasicData into test
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
Reviewed-on: #218 Reviewed-by: Pablo Natek <pablone@verdnatura.es>
This commit is contained in:
commit
7a9188317b
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue