The Angular admin pages re-use an FmEditor component for creating and
updating objects. When creating a new object after editing an existing
object, reset the editor so it won't load the previously edited object.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
this.createNew = () => {
this.editDialog.mode = 'create';
+ // We reuse the same editor for all actions. Be sure
+ // create action does not try to modify an existing record.
+ this.editDialog.recId = null;
+ this.editDialog.record = null;
this.editDialog.open({size: this.dialogSize}).then(
ok => {
this.createString.current()