mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 06:49:40 +02:00
feat(activity-log): set descending timestamps as the default sorting order BE-11343 (#66)
This commit is contained in:
parent
2f3d4a5511
commit
1061601714
2 changed files with 4 additions and 3 deletions
|
@ -33,7 +33,8 @@ export function useTableStateWithStorage<T extends BasicTableSettings>(
|
|||
}
|
||||
|
||||
export function useTableStateWithoutStorage(
|
||||
defaultSortKey?: string
|
||||
defaultSortKey?: string,
|
||||
defaultSortDesc: boolean = false
|
||||
): BasicTableSettings & {
|
||||
setSearch: (search: string) => void;
|
||||
search: string;
|
||||
|
@ -41,7 +42,7 @@ export function useTableStateWithoutStorage(
|
|||
const [search, setSearch] = useState('');
|
||||
const [pageSize, setPageSize] = useState(10);
|
||||
const [sortBy, setSortBy] = useState(
|
||||
defaultSortKey ? { id: defaultSortKey, desc: false } : undefined
|
||||
defaultSortKey ? { id: defaultSortKey, desc: defaultSortDesc } : undefined
|
||||
);
|
||||
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue