Skip to content

Commit

Permalink
Merge pull request #72 from rszwajko/fixSort
Browse files Browse the repository at this point in the history
Re-create comparator on active sort change
  • Loading branch information
yaacov authored Nov 9, 2022
2 parents 6139d2b + 48dd08e commit 32fc38a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/TableView/sort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const useSort = (
i18n.resolvedLanguage,
fields.find((field) => field.id === activeSort.id)?.comparator,
),
[fields],
[fields, activeSort],
);

return [activeSort, setActiveSort, comparator];
Expand Down

0 comments on commit 32fc38a

Please sign in to comment.