From 34402571e7615e9edcd688225ceb79085abbcc46 Mon Sep 17 00:00:00 2001 From: hinton Date: Wed, 3 Jun 2020 20:45:53 +0200 Subject: [PATCH] Add newField property to FieldView, used for allowing edits for new fields --- src/angular/components/add-edit.component.ts | 1 + src/models/view/fieldView.ts | 1 + 2 files changed, 2 insertions(+) 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) {