mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-26 17:24:45 +00:00
[ACA-4224] DocumentList - clear filterers action renders previous selection toolbar actions (#2007)
* also reset instance state * fix test
This commit is contained in:
parent
423fb05008
commit
28876a30e6
@ -151,11 +151,12 @@ describe('DocumentListDirective', () => {
|
||||
expect(storeMock.dispatch).toHaveBeenCalledWith(new SetSelectedNodesAction([]));
|
||||
});
|
||||
|
||||
it('should reset store selection and document list on `reset` event', () => {
|
||||
it('should reset selection state on `reset` event', () => {
|
||||
documentListDirective.ngOnInit();
|
||||
contentManagementServiceMock.reload.next();
|
||||
contentManagementServiceMock.reset.next();
|
||||
|
||||
expect(documentListMock.resetSelection).toHaveBeenCalled();
|
||||
expect(storeMock.dispatch).toHaveBeenCalledWith(new SetSelectedNodesAction([]));
|
||||
expect(documentListDirective.selectedNode).toBeNull();
|
||||
});
|
||||
});
|
||||
|
@ -142,6 +142,7 @@ export class DocumentListDirective implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
private reset() {
|
||||
this.selectedNode = null;
|
||||
this.documentList.resetSelection();
|
||||
this.store.dispatch(new SetSelectedNodesAction([]));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user