Add UI activation callback which will open database when opened from sidebar
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

This commit is contained in:
Garrett Mills 2020-12-24 12:16:33 -06:00
parent 9f104e8744
commit 8f7ff1de73
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246
3 changed files with 7 additions and 0 deletions

View File

@ -460,6 +460,10 @@ export class DatabaseComponent extends EditorNodeContract implements OnInit {
await modal.present(); await modal.present();
} }
performUIActivation() {
return this.openDatabase();
}
dismiss() { dismiss() {
this.modals.dismiss(); this.modals.dismiss();
} }

View File

@ -42,4 +42,6 @@ export abstract class EditorNodeContract {
public performLoad(): void | Promise<void> {} public performLoad(): void | Promise<void> {}
public performDelete(): void | Promise<void> {} public performDelete(): void | Promise<void> {}
public performUIActivation(): void | Promise<void> {}
} }

View File

@ -85,6 +85,7 @@ export class EditorPage implements OnInit {
nodes.forEach((node, i) => { nodes.forEach((node, i) => {
if ( node.nodeId === this.scrollToNodeId ) { if ( node.nodeId === this.scrollToNodeId ) {
elements[i].nativeElement.scrollIntoView(); elements[i].nativeElement.scrollIntoView();
node.performUIActivation();
} }
}); });
} }