fix: avoid null values in field layout while saving
This commit is contained in:
parent
366508fb23
commit
92fcfcebce
@ -141,7 +141,7 @@ const data = defineModel()
|
|||||||
const _fields = computed(() => {
|
const _fields = computed(() => {
|
||||||
let all_fields = []
|
let all_fields = []
|
||||||
props.fields?.forEach((field) => {
|
props.fields?.forEach((field) => {
|
||||||
let df = field.all_properties
|
let df = field?.all_properties
|
||||||
if (df?.depends_on) evaluate_depends_on(df.depends_on, field)
|
if (df?.depends_on) evaluate_depends_on(df.depends_on, field)
|
||||||
all_fields.push({
|
all_fields.push({
|
||||||
...field,
|
...field,
|
||||||
|
|||||||
@ -133,9 +133,9 @@ function saveChanges() {
|
|||||||
let _sections = JSON.parse(JSON.stringify(sections.data))
|
let _sections = JSON.parse(JSON.stringify(sections.data))
|
||||||
_sections.forEach((section) => {
|
_sections.forEach((section) => {
|
||||||
if (!section.fields) return
|
if (!section.fields) return
|
||||||
section.fields = section.fields.map(
|
section.fields = section.fields
|
||||||
(field) => field.fieldname || field.name,
|
.map((field) => field.name || field.fieldname)
|
||||||
)
|
.filter(Boolean)
|
||||||
})
|
})
|
||||||
loading.value = true
|
loading.value = true
|
||||||
call(
|
call(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user