1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +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

@@ -8,11 +8,11 @@ import {
DestroyRef,
ElementRef,
EventEmitter,
inject,
OnInit,
Output,
QueryList,
ViewChildren,
inject,
} from "@angular/core";
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
import { FormArray, FormBuilder, FormsModule, ReactiveFormsModule } from "@angular/forms";
@@ -26,16 +26,16 @@ import { FieldView } from "@bitwarden/common/vault/models/view/field.view";
import { IdentityView } from "@bitwarden/common/vault/models/view/identity.view";
import { LoginView } from "@bitwarden/common/vault/models/view/login.view";
import {
CardComponent,
CheckboxModule,
DialogService,
FormFieldModule,
IconButtonModule,
LinkModule,
SectionComponent,
SectionHeaderComponent,
FormFieldModule,
TypographyModule,
CardComponent,
IconButtonModule,
CheckboxModule,
SelectModule,
LinkModule,
TypographyModule,
} from "@bitwarden/components";
import { CipherFormContainer } from "../../cipher-form-container";
@@ -344,8 +344,9 @@ export class CustomFieldsComponent implements OnInit, AfterViewInit {
this.numberOfFieldsChange.emit(newFields.length);
this.cipherFormContainer.patchCipher({
fields: newFields,
this.cipherFormContainer.patchCipher((cipher) => {
cipher.fields = newFields;
return cipher;
});
}
}