1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-28 12:45:45 +01:00

uncheck all on destroy

This commit is contained in:
Kyle Spearrin 2018-07-27 22:05:03 -04:00
parent 15fc4e5f2d
commit c8909beedd

View File

@ -2,6 +2,7 @@ import {
Component, Component,
EventEmitter, EventEmitter,
Input, Input,
OnDestroy,
Output, Output,
} from '@angular/core'; } from '@angular/core';
@ -26,7 +27,7 @@ const MaxCheckedCount = 500;
selector: 'app-vault-ciphers', selector: 'app-vault-ciphers',
templateUrl: 'ciphers.component.html', templateUrl: 'ciphers.component.html',
}) })
export class CiphersComponent extends BaseCiphersComponent { export class CiphersComponent extends BaseCiphersComponent implements OnDestroy {
@Input() showAddNew = true; @Input() showAddNew = true;
@Output() onAttachmentsClicked = new EventEmitter<CipherView>(); @Output() onAttachmentsClicked = new EventEmitter<CipherView>();
@Output() onShareClicked = new EventEmitter<CipherView>(); @Output() onShareClicked = new EventEmitter<CipherView>();
@ -43,6 +44,10 @@ export class CiphersComponent extends BaseCiphersComponent {
this.searchPipe = new SearchCiphersPipe(platformUtilsService); this.searchPipe = new SearchCiphersPipe(platformUtilsService);
} }
ngOnDestroy() {
this.selectAll(false);
}
checkCipher(c: CipherView, select?: boolean) { checkCipher(c: CipherView, select?: boolean) {
(c as any).checked = select == null ? !(c as any).checked : select; (c as any).checked = select == null ? !(c as any).checked : select;
} }