Skip to content

Commit

Permalink
fix: sortFilterMixin.js restore sort [WTEL-5520](https://webitel.atla…
Browse files Browse the repository at this point in the history
  • Loading branch information
dlohvinov committed Nov 18, 2024
1 parent a0c150c commit e89907d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@webitel/ui-sdk",
"version": "24.10.82",
"version": "24.10.83",
"private": false,
"scripts": {
"dev": "vite",
Expand Down
15 changes: 6 additions & 9 deletions src/modules/QueryFilters/mixins/sortFilterMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,14 @@ export default {

restoreValue(value) {
const sortedColumns = decodeSortQuery({ value });
const [field, order] = Object.entries(sortedColumns)[0];

debugger;

// const sortedHeader =

// const headers = changeHeadersSort({ headers: this.headers, sortedHeader: { field: sortedColumns[0] }, order });
const headers = changeHeadersSort({
headers: this.headers,
sortedHeader: { field },
order,
});

const headers = this.headers.map((header) => ({
...header,
sort: sortedColumns[header.field] || null,
}));
this.setHeaders(headers);
},
},
Expand Down

0 comments on commit e89907d

Please sign in to comment.