From 4e151d6616b89fa3a032620dd9a2abb470c22607 Mon Sep 17 00:00:00 2001 From: Nyola Mike Date: Sun, 23 Jan 2022 06:59:26 +0300 Subject: [PATCH 1/2] Adding Colspan on td adds the ability to configure a colspan property as either a method or a static value --- src/components/Table.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/components/Table.vue b/src/components/Table.vue index 9db76153..51086267 100644 --- a/src/components/Table.vue +++ b/src/components/Table.vue @@ -249,6 +249,7 @@ :class="getClasses(i, 'td', row)" v-if="!column.hidden && column.field" v-bind:data-label="compactMode ? column.label : undefined" + :colspan="getColSpan(i,column,row)" > Date: Sun, 23 Jan 2022 07:05:38 +0300 Subject: [PATCH 2/2] passing the current index of the row to colspan function passing the current index of the row to colspan function --- src/components/Table.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Table.vue b/src/components/Table.vue index 51086267..c8b40ffe 100644 --- a/src/components/Table.vue +++ b/src/components/Table.vue @@ -1317,7 +1317,7 @@ export default { //col span getColSpan(index, column, row){ if(typeof column.colspan == "function"){ - return column.colspan(row); + return column.colspan(index,row); }else if(typeof column.colspan != "undefined"){ return column.colspan; }