page/client: Don't default form to undefined.
All checks were successful
Build dev / build (push) Successful in 52s

This fixes an issue when user does not click the form field.
it is not being defined, meaning the field will not be updated.
This commit is contained in:
Wroclaw 2023-11-09 11:35:12 +01:00
parent f5b205f90c
commit 500a9ad595

View file

@ -55,10 +55,10 @@ function updatePagedListVModel(element: Array<string>) {
const editMode = ref<boolean>(route.query?.edit === "1"); const editMode = ref<boolean>(route.query?.edit === "1");
function editorFields(): Array<fieldDefinition> { function editorFields(): Array<fieldDefinition> {
return [ return [
{ key: "name", type: "text", label: "Name", value: client.value.name ?? undefined }, { key: "name", type: "text", label: "Name", value: client.value.name ?? "" },
{ key: "address", type: "text", label: "Address", value: client.value.address ?? undefined }, { key: "address", type: "text", label: "Address", value: client.value.address ?? "" },
{ key: "phone", type: "text", label: "Phone", value: client.value.phone ?? undefined }, { key: "phone", type: "text", label: "Phone", value: client.value.phone ?? "" },
{ key: "email", type: "text", label: "E-mail", value: client.value.email ?? undefined }, { key: "email", type: "text", label: "E-mail", value: client.value.email ?? "" },
]; ];
} }