diff --git a/src/components/datatable/DataTable.vue b/src/components/datatable/DataTable.vue
index 25d38ace6..903a47da9 100644
--- a/src/components/datatable/DataTable.vue
+++ b/src/components/datatable/DataTable.vue
@@ -18,11 +18,20 @@
+
{{col.header}}
|
+
@@ -249,7 +258,7 @@ export default {
}
},
sortSingle(value) {
- let data = [...this.value];
+ let data = [...value];
data.sort((data1, data2) => {
let value1 = ObjectUtils.resolveFieldData(data1, this.d_sortField);
@@ -273,7 +282,7 @@ export default {
return data;
},
sortMultiple(value) {
- let data = [...this.value];
+ let data = [...value];
data.sort((data1, data2) => {
return this.multisortField(data1, data2, 0);
@@ -410,6 +419,18 @@ export default {
},
sorted() {
return this.d_sortField || (this.d_multiSortMeta && this.d_multiSortMeta.length > 0);
+ },
+ hasFooter() {
+ let hasFooter = false;
+
+ for (let col of this.columns) {
+ if (col.footer || col.$scopedSlots.footer) {
+ hasFooter = true;
+ break;
+ }
+ }
+
+ return hasFooter;
}
},
components: {
diff --git a/src/views/datatable/DataTableTemplatingDemo.vue b/src/views/datatable/DataTableTemplatingDemo.vue
index 01fbe1230..eda29a642 100644
--- a/src/views/datatable/DataTableTemplatingDemo.vue
+++ b/src/views/datatable/DataTableTemplatingDemo.vue
@@ -26,6 +26,9 @@
+
+
+