refresh bug fix

master
Boris Voropaev 2023-12-21 11:31:10 +03:00
parent cdd3e7862c
commit c7c3bd8f0b
3 changed files with 5 additions and 6 deletions

View File

@ -21,7 +21,6 @@ export class PagesMenuComponent implements OnInit {
ngOnInit() {
if(!this.items){
this.subscription = combineLatest([
this.pagesService.currentPageSubject,
this.pagesService.rootPagesSubject

View File

@ -15,7 +15,7 @@ export class PageComponent {
private url: string;
private inited = false;
routeSubscription?: Subscription;
subscription: Subscription;
listSubscription: Subscription;
constructor(
private router: Router,
@ -42,13 +42,14 @@ export class PageComponent {
ngOnInit() {
this.listsService.controls().subscribe(res => {
this.listSubscription = this.listsService.controls().subscribe(res => {
this.inited ? this.fetch() : this.inited = true;
});
}
ngOnDestroy() {
this.routeSubscription?.unsubscribe();
this.listSubscription.unsubscribe()
}
onNavigationEnd(event: NavigationEnd) {
@ -78,7 +79,7 @@ export class PageComponent {
this.page = res?.data;
if (this.page) {
this.pagesService.currentPage = this.page;
this.titleService.setTitle(this.page.title||this.page.h1||this.page.name)
// this.titleService.setTitle(this.page.title||this.page.h1||this.page.name)
}
this.loading = false;
}, error => {

View File

@ -361,8 +361,7 @@ form-field-image{
margin-left: 4px;
}
}
}
}
}
.field {