mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-10-01 14:41:14 +00:00
ReloadDocumentListAction over SetSelectedNodesAction
This commit is contained in:
@@ -152,19 +152,6 @@ describe('AppLayoutComponent', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not reset selection if route is `/search`', done => {
|
|
||||||
fixture.detectChanges();
|
|
||||||
const selection = [<any>{ entry: { id: 'nodeId', name: 'name' } }];
|
|
||||||
store.dispatch(new SetSelectedNodesAction(selection));
|
|
||||||
|
|
||||||
router.navigateByUrl('/search;q=');
|
|
||||||
fixture.detectChanges();
|
|
||||||
store.select(getAppSelection).subscribe(state => {
|
|
||||||
expect(state.isEmpty).toBe(false);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should close menu on mobile screen size', () => {
|
it('should close menu on mobile screen size', () => {
|
||||||
component.minimizeSidenav = false;
|
component.minimizeSidenav = false;
|
||||||
component.layout.container = {
|
component.layout.container = {
|
||||||
|
@@ -43,8 +43,8 @@ import { NodePermissionService } from '@alfresco/aca-shared';
|
|||||||
import { BreakpointObserver } from '@angular/cdk/layout';
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
||||||
import {
|
import {
|
||||||
AppStore,
|
AppStore,
|
||||||
SetSelectedNodesAction,
|
getCurrentFolder,
|
||||||
getCurrentFolder
|
ReloadDocumentListAction
|
||||||
} from '@alfresco/aca-shared/store';
|
} from '@alfresco/aca-shared/store';
|
||||||
import { Directionality } from '@angular/cdk/bidi';
|
import { Directionality } from '@angular/cdk/bidi';
|
||||||
|
|
||||||
@@ -140,15 +140,11 @@ export class AppLayoutComponent implements OnInit, OnDestroy {
|
|||||||
this.router.events
|
this.router.events
|
||||||
.pipe(
|
.pipe(
|
||||||
filter(event => {
|
filter(event => {
|
||||||
return (
|
return event instanceof NavigationStart;
|
||||||
event instanceof NavigationStart &&
|
|
||||||
// search employs reuse route strategy
|
|
||||||
!event.url.startsWith('/search;')
|
|
||||||
);
|
|
||||||
}),
|
}),
|
||||||
takeUntil(this.onDestroy$)
|
takeUntil(this.onDestroy$)
|
||||||
)
|
)
|
||||||
.subscribe(() => this.store.dispatch(new SetSelectedNodesAction([])));
|
.subscribe(() => this.store.dispatch(new ReloadDocumentListAction()));
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
|
Reference in New Issue
Block a user