mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-13 08:26:40 +00:00
change default sort on logs tables closes #1907
This commit is contained in:
@@ -257,7 +257,10 @@ export function LogDataTable<TData, TValue>({
|
||||
? {}
|
||||
: { getPaginationRowModel: getPaginationRowModel() }),
|
||||
onSortingChange: setSorting,
|
||||
getSortedRowModel: getSortedRowModel(),
|
||||
// Disable client-side sorting for server-side pagination since data is already sorted on server
|
||||
...(isServerPagination
|
||||
? {}
|
||||
: { getSortedRowModel: getSortedRowModel() }),
|
||||
onColumnFiltersChange: setColumnFilters,
|
||||
getFilteredRowModel: getFilteredRowModel(),
|
||||
onGlobalFilterChange: setGlobalFilter,
|
||||
@@ -269,6 +272,7 @@ export function LogDataTable<TData, TValue>({
|
||||
}
|
||||
: {}),
|
||||
initialState: {
|
||||
sorting: defaultSort ? [defaultSort] : [],
|
||||
pagination: {
|
||||
pageSize: pageSize,
|
||||
pageIndex: currentPage
|
||||
|
||||
Reference in New Issue
Block a user