Skip to content

Commit

Permalink
fix: sort
Browse files Browse the repository at this point in the history
  • Loading branch information
francisashley committed Jan 5, 2025
1 parent dd82bc5 commit f8e17b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-screener",
"version": "0.15.20",
"version": "0.15.21",
"type": "module",
"description": "Easily search and filter data in Vue3.",
"author": "Francis Ashley",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/data.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const sortRows = (
const sortField = options.sortField
const sortDirection = options.invertSort ? (options.sortDirection === 'asc' ? 'desc' : 'asc') : options.sortDirection
if (sortField && sortDirection) {
return [...orderBy(data, [(row: Row) => row.cells[sortField]], [sortDirection])]
return [...orderBy(data, [(row: Row) => row.cells[sortField].value], [sortDirection])]
}
return data
}
Expand Down

0 comments on commit f8e17b8

Please sign in to comment.