Fix view model editor and webview component (#1483)

* destroy viewmodel when editor is closed and add example

* support retainContextWhenHidden option for webview component

* fix breaking change from master

* dispose html element during dispose

* add more comments
This commit is contained in:
Abbie Petchtes
2018-05-24 13:54:41 -07:00
committed by GitHub
parent 1359354387
commit c208abf0c5
11 changed files with 176 additions and 147 deletions

View File

@@ -666,7 +666,7 @@ declare module 'sqlops' {
/**
* Create a new model view editor
*/
export function createModelViewEditor(title: string): ModelViewEditor;
export function createModelViewEditor(title: string, options?: ModelViewEditorOptions): ModelViewEditor;
export interface ModelViewEditor extends window.modelviewdialog.ModelViewPanel {
@@ -676,4 +676,11 @@ declare module 'sqlops' {
openEditor(position?: vscode.ViewColumn): Thenable<void>;
}
}
export interface ModelViewEditorOptions {
/**
* Should the model view editor's context be kept around even when the editor is no longer visible? It is false by default
*/
readonly retainContextWhenHidden?: boolean;
}
}