Skip to content

Commit

Permalink
fix: cv:sort payload uses 'value', not 'val' (#1543)
Browse files Browse the repository at this point in the history
  • Loading branch information
markusdobler authored Oct 19, 2023
1 parent c3469f5 commit 15b0eb3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/CvDataTable/CvDataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -611,19 +611,19 @@ function onInternalSearch() {
emit('search', searchValue.value);
}
function onSort(payload) {
const { heading, val } = payload;
const { heading, value } = payload;
const headings = store.headings(uid);
let index;
for (let colIndex in headings) {
const column = headings[colIndex];
if (column.id === heading.id) {
store.updateHeading(uid, { ...column, order: val });
store.updateHeading(uid, { ...column, order: value });
index = colIndex;
} else {
store.updateHeading(uid, { ...column, order: 'none' });
}
}
emit('sort', { index, order: val, name: heading.name });
emit('sort', { index, order: value, name: heading.name });
}
// are all rows expanded
Expand Down

0 comments on commit 15b0eb3

Please sign in to comment.