diff --git a/mediarepo-ui/src/api/models/SortKey.ts b/mediarepo-ui/src/api/models/SortKey.ts index bf85cb4..4bd651c 100644 --- a/mediarepo-ui/src/api/models/SortKey.ts +++ b/mediarepo-ui/src/api/models/SortKey.ts @@ -30,9 +30,7 @@ export class SortKey { }; } else { this.data = { - [value]: { - direction: this.sortDirection - } + [value]: this.sortDirection } as SortKeyData; } } diff --git a/mediarepo-ui/src/app/components/shared/sidebar/file-search/sort-dialog/sort-dialog.component.ts b/mediarepo-ui/src/app/components/shared/sidebar/file-search/sort-dialog/sort-dialog.component.ts index 128cc38..d9ed433 100644 --- a/mediarepo-ui/src/app/components/shared/sidebar/file-search/sort-dialog/sort-dialog.component.ts +++ b/mediarepo-ui/src/app/components/shared/sidebar/file-search/sort-dialog/sort-dialog.component.ts @@ -20,7 +20,9 @@ export class SortDialogComponent implements OnInit { public sortingPreset: SortingPreset = SortingPreset.fromValues(-1, []); public availablePresets: SortingPreset[] = []; public suggestedNamespaces: Namespace[] = []; - public emptyPreset = SortingPreset.fromValues(-1, []); + public emptyPreset = SortingPreset.fromValues(-1, [ + SortKey.fromValues("FileImportedTime", "Ascending", undefined) + ]); public previousId: number = -1; private namespaces: Namespace[] = [];