Store last filtered value between toggling of lists

This commit is contained in:
Jesse Lucas
2020-04-03 09:20:27 -05:00
parent d76f1fe356
commit a9b6801b22
7 changed files with 39 additions and 12 deletions
+8
View File
@@ -12,6 +12,13 @@ export interface FilterInput {
}
export class FilterService {
previousInputs = new Map<StType, string>(
[
[StType.Folder, ""],
[StType.Device, ""],
]
)
constructor() { }
@@ -20,6 +27,7 @@ export class FilterService {
filterChanged$ = this.filterChangeSource.asObservable();
changeFilter(input: FilterInput) {
this.previousInputs.set(input.type, input.text)
this.filterChangeSource.next(input);
}
}