From 974d57b8fc90574da1767db8d64a84352576de20 Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Tue, 1 Oct 2019 13:23:44 +0300 Subject: [PATCH] Fixed #55 - DataTable sortField cannot be synced --- src/components/datatable/DataTable.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/datatable/DataTable.vue b/src/components/datatable/DataTable.vue index 94ef61b13..c4e71af2d 100644 --- a/src/components/datatable/DataTable.vue +++ b/src/components/datatable/DataTable.vue @@ -306,7 +306,6 @@ export default { if (DomHandler.hasClass(targetNode, 'p-sortable-column') || DomHandler.hasClass(targetNode, 'p-column-title') || DomHandler.hasClass(targetNode, 'p-sortable-column-icon') || DomHandler.hasClass(targetNode.parentElement, 'p-sortable-column-icon')) { - DomHandler.clearSelection(); this.d_sortOrder = (this.d_sortField === columnField) ? this.d_sortOrder * -1 : this.defaultSortOrder; @@ -321,7 +320,7 @@ export default { this.addSortMeta({field: this.d_sortField, order: this.d_sortOrder}); } - this.$emit('update:sortField', this.d_sortFied); + this.$emit('update:sortField', this.d_sortField); this.$emit('update:sortOrder', this.d_sortOrder); this.$emit('update:multiSortMeta', this.d_multiSortMeta);