apply search state before reloading list
This commit is contained in:
parent
7d7b433f0b
commit
88b2746920
2
jslib
2
jslib
|
@ -1 +1 @@
|
||||||
Subproject commit b3d1e9d233aa7ed235d6ec0b26cdba41afa065ae
|
Subproject commit 57e49207e9ad57c71576fc487a38513a4d0fe120
|
|
@ -72,6 +72,13 @@ export class CiphersComponent extends BaseCiphersComponent implements OnInit, On
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.searchTypeSearch = !this.platformUtilsService.isSafari();
|
this.searchTypeSearch = !this.platformUtilsService.isSafari();
|
||||||
const queryParamsSub = this.route.queryParams.subscribe(async (params) => {
|
const queryParamsSub = this.route.queryParams.subscribe(async (params) => {
|
||||||
|
if (this.applySavedState) {
|
||||||
|
this.state = (await this.stateService.get<any>(ComponentId)) || {};
|
||||||
|
if (this.state.searchText) {
|
||||||
|
this.searchText = this.state.searchText;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (params.type) {
|
if (params.type) {
|
||||||
this.searchPlaceholder = this.i18nService.t('searchType');
|
this.searchPlaceholder = this.i18nService.t('searchType');
|
||||||
this.type = parseInt(params.type, null);
|
this.type = parseInt(params.type, null);
|
||||||
|
@ -121,11 +128,7 @@ export class CiphersComponent extends BaseCiphersComponent implements OnInit, On
|
||||||
await this.load();
|
await this.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.applySavedState) {
|
if (this.applySavedState && this.state != null) {
|
||||||
this.state = (await this.stateService.get<any>(ComponentId)) || {};
|
|
||||||
if (this.state.searchText) {
|
|
||||||
this.searchText = this.state.searchText;
|
|
||||||
}
|
|
||||||
window.setTimeout(() => this.popupUtils.setContentScrollY(window, this.state.scrollY), 0);
|
window.setTimeout(() => this.popupUtils.setContentScrollY(window, this.state.scrollY), 0);
|
||||||
}
|
}
|
||||||
this.stateService.remove(ComponentId);
|
this.stateService.remove(ComponentId);
|
||||||
|
|
Loading…
Reference in New Issue