Skip to content

Commit

Permalink
Add default value to empty sort preset
Browse files Browse the repository at this point in the history
Signed-off-by: trivernis <trivernis@protonmail.com>
  • Loading branch information
Trivernis committed Feb 5, 2022
1 parent 341c1a3 commit 6d6a17b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions mediarepo-ui/src/api/models/SortKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ export class SortKey {
};
} else {
this.data = {
[value]: {
direction: this.sortDirection
}
[value]: this.sortDirection
} as SortKeyData;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [];
Expand Down

0 comments on commit 6d6a17b

Please sign in to comment.