Skip to content

Commit

Permalink
#572 fixed vue warnings:'Prop being mutated'
Browse files Browse the repository at this point in the history
  • Loading branch information
gpsinghsandhu committed Sep 21, 2022
1 parent 756b882 commit cdf8352
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions web-src/src/common/components/history/executions-log-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ export default {
data() {
return {
filteredRows: this.rows ? [...this.rows] : [],
searchText: ''
searchText: '',
mySortColumn: this.sortColumn,
myAscending: this.ascending
}
},
Expand All @@ -84,24 +86,24 @@ 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;
}
this.sort();
},
sort: function() {
let ascending = this.ascending;
let ascending = this.myAscending;
let column = this.sortColumn;
this.filteredRows.sort((a, b) => {
Expand Down

0 comments on commit cdf8352

Please sign in to comment.