Skip to content

Commit a650131

Browse files
bjoernricksgreenbonebot
authored andcommitted
change: Add onSortChange handler to EntitiesTableProps
The handler was passed already an has to be forwarded to the header component.
1 parent 4b19aca commit a650131

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/web/entities/EntitiesTable.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ export interface EntitiesTableProps<
9999
onLastClick?: () => void;
100100
onNextClick?: () => void;
101101
onPreviousClick?: () => void;
102+
onSortChange?: (sortBy: string) => void;
102103
}
103104

104105
const UpdatingStripedTable = styled(StripedTable)<{$isUpdating: boolean}>`
@@ -149,6 +150,7 @@ function EntitiesTable<
149150
sortBy: currentSortBy,
150151
sortDir: currentSortDir,
151152
toggleDetailsIcon = isDefined(RowDetailsComponent),
153+
onSortChange,
152154
...props
153155
}: EntitiesTableProps<
154156
TEntity,
@@ -275,6 +277,7 @@ function EntitiesTable<
275277
<HeaderComponent
276278
currentSortBy={currentSortBy}
277279
currentSortDir={currentSortDir}
280+
onSortChange={onSortChange}
278281
{...(props as unknown as THeaderProps)}
279282
/>
280283
);

0 commit comments

Comments
 (0)