Add newField property to FieldView, used for allowing edits for new fields
This commit is contained in:
parent
1fa3eb49ad
commit
34402571e7
|
@ -296,6 +296,7 @@ export class AddEditComponent implements OnInit {
|
||||||
|
|
||||||
const f = new FieldView();
|
const f = new FieldView();
|
||||||
f.type = this.addFieldType;
|
f.type = this.addFieldType;
|
||||||
|
f.newField = true;
|
||||||
this.cipher.fields.push(f);
|
this.cipher.fields.push(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ export class FieldView implements View {
|
||||||
name: string = null;
|
name: string = null;
|
||||||
value: string = null;
|
value: string = null;
|
||||||
type: FieldType = null;
|
type: FieldType = null;
|
||||||
|
newField: boolean = false; // Marks if the filed is new and haven't been saved
|
||||||
|
|
||||||
constructor(f?: Field) {
|
constructor(f?: Field) {
|
||||||
if (!f) {
|
if (!f) {
|
||||||
|
|
Loading…
Reference in New Issue