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', () => {
|
||||
component.minimizeSidenav = false;
|
||||
component.layout.container = {
|
||||
|
@@ -43,8 +43,8 @@ import { NodePermissionService } from '@alfresco/aca-shared';
|
||||
import { BreakpointObserver } from '@angular/cdk/layout';
|
||||
import {
|
||||
AppStore,
|
||||
SetSelectedNodesAction,
|
||||
getCurrentFolder
|
||||
getCurrentFolder,
|
||||
ReloadDocumentListAction
|
||||
} from '@alfresco/aca-shared/store';
|
||||
import { Directionality } from '@angular/cdk/bidi';
|
||||
|
||||
@@ -140,15 +140,11 @@ export class AppLayoutComponent implements OnInit, OnDestroy {
|
||||
this.router.events
|
||||
.pipe(
|
||||
filter(event => {
|
||||
return (
|
||||
event instanceof NavigationStart &&
|
||||
// search employs reuse route strategy
|
||||
!event.url.startsWith('/search;')
|
||||
);
|
||||
return event instanceof NavigationStart;
|
||||
}),
|
||||
takeUntil(this.onDestroy$)
|
||||
)
|
||||
.subscribe(() => this.store.dispatch(new SetSelectedNodesAction([])));
|
||||
.subscribe(() => this.store.dispatch(new ReloadDocumentListAction()));
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
Reference in New Issue
Block a user