1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-24 08:33:29 +00:00

[PM-9190] Use updateFn for patchCipher so that the current CipherView is available for context (#10258)

This commit is contained in:
Shane Melton
2024-07-25 07:50:39 -07:00
committed by GitHub
parent 14f51544c7
commit f4023762a8
13 changed files with 175 additions and 124 deletions

View File

@@ -66,9 +66,10 @@ export class AdditionalOptionsSectionComponent implements OnInit {
this.cipherFormContainer.registerChildForm("additionalOptions", this.additionalOptionsForm);
this.additionalOptionsForm.valueChanges.pipe(takeUntilDestroyed()).subscribe((value) => {
this.cipherFormContainer.patchCipher({
notes: value.notes,
reprompt: value.reprompt ? CipherRepromptType.Password : CipherRepromptType.None,
this.cipherFormContainer.patchCipher((cipher) => {
cipher.notes = value.notes;
cipher.reprompt = value.reprompt ? CipherRepromptType.Password : CipherRepromptType.None;
return cipher;
});
});
}