fix: extend last section if have space below
This commit is contained in:
parent
5e5d4756b1
commit
b1bfeca712
@ -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()
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -161,6 +161,7 @@
|
||||
<SectionFields
|
||||
v-if="section.fields"
|
||||
:fields="section.fields"
|
||||
:isLastSection="i == fieldsLayout.data.length - 1"
|
||||
v-model="deal.data"
|
||||
@update="updateField"
|
||||
/>
|
||||
|
||||
@ -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"
|
||||
/>
|
||||
|
||||
@ -101,6 +101,7 @@
|
||||
<SectionFields
|
||||
v-if="section.fields"
|
||||
:fields="section.fields"
|
||||
:isLastSection="i == fieldsLayout.data.length - 1"
|
||||
v-model="deal.data"
|
||||
@update="updateField"
|
||||
/>
|
||||
|
||||
@ -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"
|
||||
/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user