From 01b38bf5aeb0a207391ae7ed3f5f821cf6e37c2f Mon Sep 17 00:00:00 2001 From: mertsincan Date: Tue, 19 Dec 2023 15:01:13 +0000 Subject: [PATCH] Fixed #3818 - DataTable: Pass sorted data on sort event --- components/lib/datatable/DataTable.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/components/lib/datatable/DataTable.vue b/components/lib/datatable/DataTable.vue index 3cbd14cae..ad114fa68 100755 --- a/components/lib/datatable/DataTable.vue +++ b/components/lib/datatable/DataTable.vue @@ -458,7 +458,9 @@ export default { this.$emit('update:first', this.d_first); this.$emit('update:rows', this.d_rows); this.$emit('page', pageEvent); - this.$emit('value-change', this.processedData); + this.$nextTick(() => { + this.$emit('value-change', this.processedData); + }); }, onColumnHeaderClick(e) { const event = e.originalEvent; @@ -507,7 +509,9 @@ export default { } this.$emit('sort', this.createLazyLoadEvent(event)); - this.$emit('value-change', this.processedData); + this.$nextTick(() => { + this.$emit('value-change', this.processedData); + }); } } }, @@ -683,7 +687,9 @@ export default { filterEvent.filteredValue = filteredValue; this.$emit('filter', filterEvent); - this.$emit('value-change', filteredValue); + this.$nextTick(() => { + this.$emit('value-change', this.processedData); + }); return filteredValue; },