Add auto-save support and saving indicator
This commit is contained in:
@@ -199,12 +199,15 @@ export class CodeComponent extends EditorNodeContract implements OnInit {
|
||||
public onEditorModelChange($event) {
|
||||
if ( this.editorValue !== this.dbRecord.code ) {
|
||||
this.dirty = true;
|
||||
this.editorService.triggerSave();
|
||||
}
|
||||
}
|
||||
|
||||
public onSelectChange(updateDbRecord = true) {
|
||||
if ( updateDbRecord ) {
|
||||
this.dbRecord.Language = this.editorOptions.language;
|
||||
this.editorService.triggerSave();
|
||||
this.dirty = true;
|
||||
}
|
||||
|
||||
this.editorOptions = {...this.editorOptions};
|
||||
|
||||
@@ -71,6 +71,7 @@ export class DatabaseComponent extends EditorNodeContract implements OnInit {
|
||||
|
||||
onCellValueChanged() {
|
||||
this.dirty = true;
|
||||
this.editorService.triggerSave();
|
||||
}
|
||||
|
||||
async onManageColumns() {
|
||||
@@ -98,6 +99,7 @@ export class DatabaseComponent extends EditorNodeContract implements OnInit {
|
||||
this.rowData.push({});
|
||||
this.agGridElement.api.setRowData(this.rowData);
|
||||
this.dirty = true;
|
||||
this.editorService.triggerSave();
|
||||
}
|
||||
|
||||
async onRemoveRow() {
|
||||
@@ -122,6 +124,7 @@ export class DatabaseComponent extends EditorNodeContract implements OnInit {
|
||||
this.agGridElement.api.setRowData(this.rowData);
|
||||
this.lastClickRow = -1;
|
||||
this.dirty = true;
|
||||
this.editorService.triggerSave();
|
||||
},
|
||||
}
|
||||
],
|
||||
@@ -168,6 +171,7 @@ export class DatabaseComponent extends EditorNodeContract implements OnInit {
|
||||
|
||||
this.agGridElement.api.setColumnDefs(this.columnDefs);
|
||||
this.dirty = true;
|
||||
this.editorService.triggerSave();
|
||||
}
|
||||
|
||||
public async performLoad(): Promise<void> {
|
||||
|
||||
@@ -62,6 +62,7 @@ export class NormComponent extends EditorNodeContract implements OnInit {
|
||||
const innerHTML = this.editable.nativeElement.innerHTML;
|
||||
if ( this.contents !== innerHTML ) {
|
||||
this.contents = innerHTML;
|
||||
this.editorService.triggerSave();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user