From cdf8352891251e448b1858eaab0de8a62d608476 Mon Sep 17 00:00:00 2001 From: Gurpinder Singh Date: Wed, 21 Sep 2022 18:50:35 +0530 Subject: [PATCH] #572 fixed vue warnings:'Prop being mutated' --- .../components/history/executions-log-table.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/web-src/src/common/components/history/executions-log-table.vue b/web-src/src/common/components/history/executions-log-table.vue index 769ca117..666bff66 100644 --- a/web-src/src/common/components/history/executions-log-table.vue +++ b/web-src/src/common/components/history/executions-log-table.vue @@ -65,7 +65,9 @@ export default { data() { return { filteredRows: this.rows ? [...this.rows] : [], - searchText: '' + searchText: '', + mySortColumn: this.sortColumn, + myAscending: this.ascending } }, @@ -84,16 +86,16 @@ export default { methods: { showSort: function (sortKey) { - if (this.sortColumn === sortKey) { - return this.ascending ? 'sorted asc' : 'sorted desc' + if (this.mySortColumn === sortKey) { + return this.myAscending ? 'sorted asc' : 'sorted desc' } }, sortBy: function (sortKey) { if (this.sortColumn === sortKey) { - this.ascending = !this.ascending; + this.myAscending = !this.myAscending; } else { - this.ascending = true; + this.myAscending = true; this.sortColumn = sortKey; } @@ -101,7 +103,7 @@ export default { }, sort: function() { - let ascending = this.ascending; + let ascending = this.myAscending; let column = this.sortColumn; this.filteredRows.sort((a, b) => {