1
0
forked from test/crm

fix: extend last section if have space below

This commit is contained in:
Shariq Ansari 2024-09-17 11:20:10 +05:30
parent 5e5d4756b1
commit b1bfeca712
6 changed files with 15 additions and 2 deletions

View File

@ -1,6 +1,7 @@
<template>
<FadedScrollableDiv
class="flex max-h-[300px] flex-col gap-1.5 overflow-y-auto"
class="flex flex-col gap-1.5 overflow-y-auto"
:class="[isLastSection ? '' : 'max-h-[300px]']"
>
<div
v-for="field in _fields"
@ -124,6 +125,10 @@ const props = defineProps({
type: Object,
required: true,
},
isLastSection: {
type: Boolean,
default: false,
},
})
const { getUser } = usersStore()

View File

@ -43,7 +43,11 @@
:class="{ 'border-b': i !== sections.data.length - 1 }"
>
<Section :is-opened="section.opened" :label="section.label">
<SectionFields :fields="section.fields" v-model="data" />
<SectionFields
:fields="section.fields"
:isLastSection="i == section.data.length - 1"
v-model="data"
/>
</Section>
</div>
</div>

View File

@ -161,6 +161,7 @@
<SectionFields
v-if="section.fields"
:fields="section.fields"
:isLastSection="i == fieldsLayout.data.length - 1"
v-model="deal.data"
@update="updateField"
/>

View File

@ -176,6 +176,7 @@
<Section :is-opened="section.opened" :label="section.label">
<SectionFields
:fields="section.fields"
:isLastSection="i == fieldsLayout.data.length - 1"
v-model="lead.data"
@update="updateField"
/>

View File

@ -101,6 +101,7 @@
<SectionFields
v-if="section.fields"
:fields="section.fields"
:isLastSection="i == fieldsLayout.data.length - 1"
v-model="deal.data"
@update="updateField"
/>

View File

@ -77,6 +77,7 @@
<Section :is-opened="section.opened" :label="section.label">
<SectionFields
:fields="section.fields"
:isLastSection="i == fieldsLayout.data.length - 1"
v-model="lead.data"
@update="updateField"
/>