fix: extend last section if have space below
This commit is contained in:
parent
5e5d4756b1
commit
b1bfeca712
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<FadedScrollableDiv
|
<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
|
<div
|
||||||
v-for="field in _fields"
|
v-for="field in _fields"
|
||||||
@ -124,6 +125,10 @@ const props = defineProps({
|
|||||||
type: Object,
|
type: Object,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
isLastSection: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const { getUser } = usersStore()
|
const { getUser } = usersStore()
|
||||||
|
|||||||
@ -43,7 +43,11 @@
|
|||||||
:class="{ 'border-b': i !== sections.data.length - 1 }"
|
:class="{ 'border-b': i !== sections.data.length - 1 }"
|
||||||
>
|
>
|
||||||
<Section :is-opened="section.opened" :label="section.label">
|
<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>
|
</Section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -161,6 +161,7 @@
|
|||||||
<SectionFields
|
<SectionFields
|
||||||
v-if="section.fields"
|
v-if="section.fields"
|
||||||
:fields="section.fields"
|
:fields="section.fields"
|
||||||
|
:isLastSection="i == fieldsLayout.data.length - 1"
|
||||||
v-model="deal.data"
|
v-model="deal.data"
|
||||||
@update="updateField"
|
@update="updateField"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -176,6 +176,7 @@
|
|||||||
<Section :is-opened="section.opened" :label="section.label">
|
<Section :is-opened="section.opened" :label="section.label">
|
||||||
<SectionFields
|
<SectionFields
|
||||||
:fields="section.fields"
|
:fields="section.fields"
|
||||||
|
:isLastSection="i == fieldsLayout.data.length - 1"
|
||||||
v-model="lead.data"
|
v-model="lead.data"
|
||||||
@update="updateField"
|
@update="updateField"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -101,6 +101,7 @@
|
|||||||
<SectionFields
|
<SectionFields
|
||||||
v-if="section.fields"
|
v-if="section.fields"
|
||||||
:fields="section.fields"
|
:fields="section.fields"
|
||||||
|
:isLastSection="i == fieldsLayout.data.length - 1"
|
||||||
v-model="deal.data"
|
v-model="deal.data"
|
||||||
@update="updateField"
|
@update="updateField"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -77,6 +77,7 @@
|
|||||||
<Section :is-opened="section.opened" :label="section.label">
|
<Section :is-opened="section.opened" :label="section.label">
|
||||||
<SectionFields
|
<SectionFields
|
||||||
:fields="section.fields"
|
:fields="section.fields"
|
||||||
|
:isLastSection="i == fieldsLayout.data.length - 1"
|
||||||
v-model="lead.data"
|
v-model="lead.data"
|
||||||
@update="updateField"
|
@update="updateField"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user