Skip to content

Commit

Permalink
Merge branch 'fix/sort-index-infinite-table' into alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
mguellsegarra committed Nov 4, 2024
2 parents 019704d + 0f2ef84 commit c277721
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/InfiniteTable/InfiniteTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ const InfiniteTableComp = forwardRef<InfiniteTableRef, InfiniteTableProps>(
| undefined => {
const state = gridRef?.current?.api.getColumnState()!;

const columnsWithSort = state.filter((col) => col.sort);
const columnsWithSort = state
.filter((col) => col.sort)
.sort((a, b) => (a.sortIndex || 0) - (b.sortIndex || 0));

if (columnsWithSort.length === 0) {
return undefined;
}
Expand Down

0 comments on commit c277721

Please sign in to comment.