From c8909beeddb62e6655c32f85722655ff7d326741 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 27 Jul 2018 22:05:03 -0400 Subject: [PATCH] uncheck all on destroy --- src/app/vault/ciphers.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/vault/ciphers.component.ts b/src/app/vault/ciphers.component.ts index 04470455b4..2baf7a7e36 100644 --- a/src/app/vault/ciphers.component.ts +++ b/src/app/vault/ciphers.component.ts @@ -2,6 +2,7 @@ import { Component, EventEmitter, Input, + OnDestroy, Output, } from '@angular/core'; @@ -26,7 +27,7 @@ const MaxCheckedCount = 500; selector: 'app-vault-ciphers', templateUrl: 'ciphers.component.html', }) -export class CiphersComponent extends BaseCiphersComponent { +export class CiphersComponent extends BaseCiphersComponent implements OnDestroy { @Input() showAddNew = true; @Output() onAttachmentsClicked = new EventEmitter(); @Output() onShareClicked = new EventEmitter(); @@ -43,6 +44,10 @@ export class CiphersComponent extends BaseCiphersComponent { this.searchPipe = new SearchCiphersPipe(platformUtilsService); } + ngOnDestroy() { + this.selectAll(false); + } + checkCipher(c: CipherView, select?: boolean) { (c as any).checked = select == null ? !(c as any).checked : select; }