add ability to dynamically update tabs (#9911)

* add dashboard and tabbedPanel samples

* add updateTabs to tabbedPanel component

* add updateTabs to tabbedPanel component
This commit is contained in:
Alan Ren
2020-04-09 12:02:00 -07:00
committed by GitHub
parent 82f21faf79
commit 23f1a08aa0
6 changed files with 117 additions and 50 deletions

View File

@@ -210,6 +210,12 @@ declare module 'azdata' {
* The event argument is the id of the selected tab.
*/
onTabChanged: vscode.Event<string>;
/**
* update the tabs.
* @param tabs new tabs
*/
updateTabs(tabs: (Tab | TabGroup)[]): void;
}
/**
@@ -310,6 +316,7 @@ declare module 'azdata' {
export interface ModelViewDashboard {
registerTabs(handler: (view: ModelView) => Thenable<(DashboardTab | DashboardTabGroup)[]>): void;
open(): Thenable<void>;
updateTabs(tabs: (DashboardTab | DashboardTabGroup)[]): void;
}
export function createModelViewDashboard(title: string, options?: ModelViewDashboardOptions): ModelViewDashboard;