Skip to content

Commit

Permalink
fix: sort on swr tables
Browse files Browse the repository at this point in the history
  • Loading branch information
luizakp committed Mar 20, 2024
1 parent 1fe4752 commit 72846fc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/DataTable/SWRDataTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { DataTableToolbar } from "#/components/DataTable/DataTableToolbar";
export function formatRequestParams(originalObj) {
return {
...originalObj,
sorting: originalObj?.sorting?.length > 0 ? originalObj.sorting[0] : null,
columnFilters: originalObj.columnFilters.reduce((acc, filter) => {
acc[filter.id] = filter.value;
return acc;
Expand Down

0 comments on commit 72846fc

Please sign in to comment.