diff --git a/src/angular/components/add-edit.component.ts b/src/angular/components/add-edit.component.ts index 389f6d4908..87c7cd3f8c 100644 --- a/src/angular/components/add-edit.component.ts +++ b/src/angular/components/add-edit.component.ts @@ -296,6 +296,7 @@ export class AddEditComponent implements OnInit { const f = new FieldView(); f.type = this.addFieldType; + f.newField = true; this.cipher.fields.push(f); } diff --git a/src/models/view/fieldView.ts b/src/models/view/fieldView.ts index 20d695da15..e09d5957dd 100644 --- a/src/models/view/fieldView.ts +++ b/src/models/view/fieldView.ts @@ -8,6 +8,7 @@ export class FieldView implements View { name: string = null; value: string = null; type: FieldType = null; + newField: boolean = false; // Marks if the filed is new and haven't been saved constructor(f?: Field) { if (!f) {