passed correct column span

This commit is contained in:
shumit taher 2025-09-02 09:24:38 +00:00
parent fda26bb305
commit 1f8ae2f966
2 changed files with 6 additions and 4 deletions

View file

@ -4,7 +4,7 @@
:icon="icon" :icon="icon"
:uniqueKey="groupId" :uniqueKey="groupId"
:collapsed="displayData.collapsed" :collapsed="displayData.collapsed"
:cols="displayData.cols" :cols="effectiveColsSpan"
:rows="displayData.rows" :rows="displayData.rows"
:color="displayData.color" :color="displayData.color"
:customStyles="displayData.customStyles" :customStyles="displayData.customStyles"
@ -14,7 +14,6 @@
:id="sectionRef" :id="sectionRef"
:ref="sectionRef" :ref="sectionRef"
> >
{{ activeColCount }}
<!-- If no items, show message --> <!-- If no items, show message -->
<div v-if="isEmpty" class="no-items"> <div v-if="isEmpty" class="no-items">
{{ $t('home.no-items-section') }} {{ $t('home.no-items-section') }}
@ -129,7 +128,7 @@ export default {
widgets: Array, widgets: Array,
index: Number, index: Number,
isWide: Boolean, isWide: Boolean,
activeColCount: Number, activeColCount: String,
}, },
components: { components: {
Collapsable, Collapsable,
@ -211,6 +210,9 @@ export default {
} }
return styles; return styles;
}, },
effectiveColsSpan() {
return Math.min(this.activeColCount, this.displayData.cols);
},
}, },
methods: { methods: {
/* Opens the iframe modal */ /* Opens the iframe modal */

View file

@ -85,7 +85,7 @@ export default {
layout: '', layout: '',
itemSizeBound: '', itemSizeBound: '',
addNewSectionOpen: false, addNewSectionOpen: false,
activeColCount: 1, activeColCount: '1',
}), }),
computed: { computed: {
singleSectionView() { singleSectionView() {