1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 07:19:41 +02:00

fix(notifications): sort by newest first by default [EE-4467] (#7891)

This commit is contained in:
itsconquest 2022-10-19 15:25:20 +13:00 committed by GitHub
parent 58947fee69
commit c1f94be9b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 5 deletions

View file

@ -24,10 +24,11 @@ export interface SortableTableSettings {
export function sortableSettings(
set: Set<SortableTableSettings>,
initialSortBy = 'name'
initialSortBy = 'name',
desc = false
): SortableTableSettings {
return {
sortBy: { id: initialSortBy, desc: false },
sortBy: { id: initialSortBy, desc },
setSortBy: (id: string, desc: boolean) => set({ sortBy: { id, desc } }),
};
}