Skip to content

Commit

Permalink
fix: extend last section if have space below
Browse files Browse the repository at this point in the history
  • Loading branch information
shariquerik committed Sep 17, 2024
1 parent 5e5d475 commit b1bfeca
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 2 deletions.
7 changes: 6 additions & 1 deletion frontend/src/components/SectionFields.vue
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -124,6 +125,10 @@ const props = defineProps({
type: Object,
required: true,
},
isLastSection: {
type: Boolean,
default: false,
},
})
const { getUser } = usersStore()
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/Settings/SidePanelModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/Deal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
<SectionFields
v-if="section.fields"
:fields="section.fields"
:isLastSection="i == fieldsLayout.data.length - 1"
v-model="deal.data"
@update="updateField"
/>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/Lead.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/MobileDeal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
<SectionFields
v-if="section.fields"
:fields="section.fields"
:isLastSection="i == fieldsLayout.data.length - 1"
v-model="deal.data"
@update="updateField"
/>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/MobileLead.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
Expand Down

0 comments on commit b1bfeca

Please sign in to comment.