From b36f1d8b0fb1f42428d61c3b683e7c95c0a67553 Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Mon, 18 Nov 2019 15:09:29 +0300 Subject: [PATCH] Fixed draggable rows --- src/components/datatable/DataTable.vue | 7 ++++--- src/components/datatable/TableBody.vue | 20 ++++++++++++++++---- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/components/datatable/DataTable.vue b/src/components/datatable/DataTable.vue index 092daeb96..8efaa1268 100644 --- a/src/components/datatable/DataTable.vue +++ b/src/components/datatable/DataTable.vue @@ -29,7 +29,8 @@ @column-resizestart="onColumnResizeStart($event)" @checkbox-change="toggleRowsWithCheckbox($event)" /> @@ -93,6 +93,10 @@ export default { type: Array, default: null }, + expandedRowKeys: { + type: null, + default: null + }, selection: { type: [Array,Object], default: null @@ -116,6 +120,14 @@ export default { compareSelectionBy: { type: String, default: 'deepEquals' + }, + editingRows: { + type: Array, + default: null + }, + editingRowKeys: { + type: null, + default: null } }, methods: { @@ -238,7 +250,7 @@ export default { isRowEditing(rowData) { if (rowData && this.editingRows) { if (this.dataKey) - return this.d_editingRowKeys ? this.d_editingRowKeys[ObjectUtils.resolveFieldData(rowData, this.dataKey)] !== undefined : false; + return this.editingRowKeys ? this.editingRowKeys[ObjectUtils.resolveFieldData(rowData, this.dataKey)] !== undefined : false; else return this.findIndex(rowData, this.editingRows) > -1; } @@ -248,7 +260,7 @@ export default { isRowExpanded(rowData) { if (rowData && this.expandedRows) { if (this.dataKey) - return this.d_expandedRowKeys ? this.d_expandedRowKeys[ObjectUtils.resolveFieldData(rowData, this.dataKey)] !== undefined : false; + return this.expandedRowKeys ? this.expandedRowKeys[ObjectUtils.resolveFieldData(rowData, this.dataKey)] !== undefined : false; else return this.findIndex(rowData, this.expandedRows) > -1; }