mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
[ACS-8991] Fix sidenav issue when clicking on manage saved searches (#4238)
This commit is contained in:
parent
726d9ce7dd
commit
baaa8ca37b
@ -1 +1 @@
|
||||
<app-expand-menu *ngIf="item" [item]="item" (actionClicked)="onActionClick()" />
|
||||
<app-expand-menu *ngIf="item" [item]="item" (actionClicked)="onActionClick($event)" />
|
||||
|
@ -63,8 +63,10 @@ export class SaveSearchSidenavComponent implements OnInit, OnDestroy {
|
||||
this.destroy$.complete();
|
||||
}
|
||||
|
||||
onActionClick(): void {
|
||||
this.appService.appNavNarMode$.next('collapsed');
|
||||
onActionClick(el: NavBarLinkRef): void {
|
||||
if (el.id !== this.manageSearchesId) {
|
||||
this.appService.appNavNarMode$.next('collapsed');
|
||||
}
|
||||
}
|
||||
|
||||
private createNavBarLinkRef(children: SavedSearch[]): NavBarLinkRef {
|
||||
|
@ -43,7 +43,7 @@
|
||||
<button
|
||||
acaActiveLink="aca-action-button--active"
|
||||
[action]="child"
|
||||
(actionClicked)="actionClicked.emit()"
|
||||
(actionClicked)="actionClicked.emit($event)"
|
||||
[attr.aria-label]="child.title | translate"
|
||||
[id]="child.id"
|
||||
[attr.data-automation-id]="child.id"
|
||||
|
@ -55,7 +55,7 @@ export class ExpandMenuComponent implements OnInit {
|
||||
item: NavBarLinkRef;
|
||||
|
||||
@Output()
|
||||
actionClicked = new EventEmitter<void>();
|
||||
actionClicked = new EventEmitter<NavBarLinkRef>();
|
||||
|
||||
constructor(private cd: ChangeDetectorRef) {}
|
||||
|
||||
|
@ -26,6 +26,7 @@ import { Directive, EventEmitter, HostListener, Input, Output } from '@angular/c
|
||||
import { Params, PRIMARY_OUTLET, Router } from '@angular/router';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { AppStore } from '@alfresco/aca-shared/store';
|
||||
import { NavBarLinkRef } from '@alfresco/adf-extensions';
|
||||
|
||||
@Directive({
|
||||
standalone: true,
|
||||
@ -36,7 +37,7 @@ import { AppStore } from '@alfresco/aca-shared/store';
|
||||
export class ActionDirective {
|
||||
@Input() action;
|
||||
|
||||
@Output() actionClicked = new EventEmitter<void>();
|
||||
@Output() actionClicked = new EventEmitter<NavBarLinkRef>();
|
||||
|
||||
@HostListener('click')
|
||||
onClick() {
|
||||
@ -48,7 +49,7 @@ export class ActionDirective {
|
||||
payload: this.getNavigationCommands(this.action.click.payload)
|
||||
});
|
||||
}
|
||||
this.actionClicked.next();
|
||||
this.actionClicked.next(this.action);
|
||||
}
|
||||
|
||||
constructor(private router: Router, private store: Store<AppStore>) {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user