From b50286bca6e0d0867c288c65c38eb8e698d97a2c Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Mon, 18 Nov 2019 17:52:30 +0300 Subject: [PATCH] Implemented Frozen Rows --- src/components/datatable/DataTable.vue | 17 ++++++++++- src/components/datatable/ScrollableView.vue | 1 + src/views/datatable/DataTableScrollDemo.vue | 32 +++++++++++++++------ 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/src/components/datatable/DataTable.vue b/src/components/datatable/DataTable.vue index c190036b2..c09322c38 100644 --- a/src/components/datatable/DataTable.vue +++ b/src/components/datatable/DataTable.vue @@ -60,6 +60,17 @@ @cell-edit-init="onCellEditInit($event)" @cell-edit-complete="onCellEditComplete($event)" @cell-edit-cancel="onCellEditCancel($event)" @row-edit-init="onRowEditInit($event)" @row-edit-save="onRowEditSave($event)" @row-edit-cancel="onRowEditCancel($event)"/> + @@ -278,7 +289,11 @@ export default { scrollHeight: { type: String, default: null - } + }, + frozenValue: { + type: Array, + default: null + }, }, data() { return { diff --git a/src/components/datatable/ScrollableView.vue b/src/components/datatable/ScrollableView.vue index 6f07d4615..180ce433e 100644 --- a/src/components/datatable/ScrollableView.vue +++ b/src/components/datatable/ScrollableView.vue @@ -7,6 +7,7 @@ + diff --git a/src/views/datatable/DataTableScrollDemo.vue b/src/views/datatable/DataTableScrollDemo.vue index dbd9103dd..90ed12762 100644 --- a/src/views/datatable/DataTableScrollDemo.vue +++ b/src/views/datatable/DataTableScrollDemo.vue @@ -20,14 +20,22 @@

Horizontal and Vertical

- - - - - - - - + + + + + + + + + + +

Frozen Rows

+ + + + + @@ -55,7 +63,8 @@ import DataTableSubMenu from './DataTableSubMenu'; export default { data() { return { - cars: null + cars: null, + frozenCars: null } }, carService: null, @@ -64,6 +73,11 @@ export default { }, mounted() { this.carService.getCarsLarge().then(data => this.cars = data); + + this.frozenCars = [ + {brand: "BMW", year: 2013, color: "Grey", vin: "fh2uf23"}, + {brand: "Chevrolet", year: 2011, color: "Black", vin: "4525g23"} + ]; }, components: { 'DataTableSubMenu': DataTableSubMenu