fix: minor fixes in side panel layout

This commit is contained in:
Shariq Ansari 2024-09-28 14:44:32 +05:30
parent 7962d3a895
commit 01cbdb9ba9
2 changed files with 3 additions and 4 deletions

View File

@ -125,7 +125,6 @@ import { computed } from 'vue'
const props = defineProps({
fields: {
type: Object,
required: true,
},
isLastSection: {
type: Boolean,
@ -146,7 +145,7 @@ const _fields = computed(() => {
if (df?.depends_on) evaluate_depends_on(df.depends_on, field)
all_fields.push({
...field,
filters: df.link_filters && JSON.parse(df.link_filters),
filters: df?.link_filters && JSON.parse(df.link_filters),
placeholder: field.placeholder || field.label,
})
})

View File

@ -40,12 +40,12 @@
v-for="(section, i) in sections.data"
:key="section.label"
class="flex flex-col py-1.5 px-1"
:class="{ 'border-b': i !== sections.data.length - 1 }"
:class="{ 'border-b': i !== sections.data?.length - 1 }"
>
<Section :is-opened="section.opened" :label="section.label">
<SectionFields
:fields="section.fields"
:isLastSection="i == section.data.length - 1"
:isLastSection="i == section.data?.length - 1"
v-model="data"
/>
</Section>