Add default value to empty sort preset

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/12/head
trivernis 2 years ago
parent 341c1a35d6
commit 6d6a17bac5
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -30,9 +30,7 @@ export class SortKey {
};
} else {
this.data = {
[value]: {
direction: this.sortDirection
}
[value]: this.sortDirection
} as SortKeyData;
}
}

@ -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[] = [];

Loading…
Cancel
Save