From 9abe00e7901b55c37f59108dd419d0d246f1ee00 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 12 Aug 2019 16:44:14 -0400 Subject: [PATCH] LPXXX FM Editor refresh display for inline mode Force the editor to re-render its record in real time when using inline mode, since the call to open() will never occur for inline mode. Signed-off-by: Bill Erickson --- Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts index 9753ce5ccb..c6cb25ef2c 100644 --- a/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts +++ b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts @@ -200,6 +200,11 @@ export class FmRecordEditorComponent setRecord(record: IdlObject) { this.record = record; this.recId = null; + if (!this.isDialog()) { + // in inline mode, update the display immediately to reflect + // the change in source record. + this.initRecord(); + } } // Translate comma-separated string versions of various inputs @@ -257,7 +262,8 @@ export class FmRecordEditorComponent // // Create a new record from the stub record provided by the // caller or a new from-scratch record - this.setRecord(this.record || this.idl.create(this.idlClass)); + this.record = this.record || this.idl.create(this.idlClass); + this.recId = null; // avoid future confusion return this.getFieldList(); } -- 2.11.0