diff --git a/samples/sqlservices/src/controllers/mainController.ts b/samples/sqlservices/src/controllers/mainController.ts index fd6073f67c..0052ff1ccd 100644 --- a/samples/sqlservices/src/controllers/mainController.ts +++ b/samples/sqlservices/src/controllers/mainController.ts @@ -131,7 +131,7 @@ export default class MainController implements vscode.Disposable { }); dropdown.onValueChanged((params) => { vscode.window.showInformationMessage(inputBox2.value); - inputBox.value = dropdown.value; + inputBox.value = dropdown.value.toString(); }); let radioButton = view.modelBuilder.radioButton() .withProperties({ diff --git a/src/sql/parts/modelComponents/modelComponentWrapper.component.ts b/src/sql/parts/modelComponents/modelComponentWrapper.component.ts index df0cc07b9a..f70c6df44a 100644 --- a/src/sql/parts/modelComponents/modelComponentWrapper.component.ts +++ b/src/sql/parts/modelComponents/modelComponentWrapper.component.ts @@ -94,8 +94,8 @@ export class ModelComponentWrapper extends AngularDisposable implements OnInit { } public layout(): void { - if (this._componentInstance && this._componentInstance.layout) { - this._componentInstance.layout(); + if (this.componentInstance && this.componentInstance.layout) { + this.componentInstance.layout(); } } @@ -110,6 +110,12 @@ export class ModelComponentWrapper extends AngularDisposable implements OnInit { }; } + private get componentInstance(): IComponent { + if (!this._componentInstance) { + this.loadComponent(); + } + return this._componentInstance; + } private loadComponent(): void { if (!this.descriptor || !this.descriptor.type) { diff --git a/src/sql/parts/modelComponents/modelViewContent.component.ts b/src/sql/parts/modelComponents/modelViewContent.component.ts index 17b4f6a463..06468d8fc6 100644 --- a/src/sql/parts/modelComponents/modelViewContent.component.ts +++ b/src/sql/parts/modelComponents/modelViewContent.component.ts @@ -26,7 +26,7 @@ import * as sqlops from 'sqlops'; selector: 'modelview-content', template: `
- +
` diff --git a/src/sql/platform/dialog/dialog.module.ts b/src/sql/platform/dialog/dialog.module.ts index 25e07772da..d78e91a7d0 100644 --- a/src/sql/platform/dialog/dialog.module.ts +++ b/src/sql/platform/dialog/dialog.module.ts @@ -26,10 +26,11 @@ import { InputBox } from 'sql/base/browser/ui/inputBox/inputBox.component'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { Registry } from 'vs/platform/registry/common/platform'; -/* Model-backed components */ -let extensionComponents = Registry.as(Extensions.ComponentContribution).getAllCtors(); - export const DialogModule = (params, selector: string, instantiationService: IInstantiationService): any => { + + /* Model-backed components */ + let extensionComponents = Registry.as(Extensions.ComponentContribution).getAllCtors(); + @NgModule({ declarations: [ Checkbox, diff --git a/src/sql/platform/dialog/dialogPane.ts b/src/sql/platform/dialog/dialogPane.ts index cf1cb11efb..ca77b27ce0 100644 --- a/src/sql/platform/dialog/dialogPane.ts +++ b/src/sql/platform/dialog/dialogPane.ts @@ -93,12 +93,12 @@ export class DialogPane extends Disposable implements IThemable { } private getTabDimension(): DOM.Dimension { - return new DOM.Dimension(DOM.getContentWidth(this._body), DOM.getContentHeight(this._body)); + return new DOM.Dimension(DOM.getContentWidth(this._body) - 5, DOM.getContentHeight(this._body) - 5); } public layout(): void { if (this._tabbedPanel) { - this._tabbedPanel.layout(new DOM.Dimension(DOM.getContentWidth(this._body), DOM.getContentHeight(this._body))); + this._tabbedPanel.layout(this.getTabDimension()); this._onTabChange.fire(this._selectedTabContent); } } diff --git a/src/sql/sqlops.proposed.d.ts b/src/sql/sqlops.proposed.d.ts index 998cd17713..7c5cc6b34b 100644 --- a/src/sql/sqlops.proposed.d.ts +++ b/src/sql/sqlops.proposed.d.ts @@ -301,7 +301,7 @@ declare module 'sqlops' { } export enum CardType { - VerticalButton = 'VerticalButton', + VerticalButton = 'VerticalButton', Details = 'Details' } @@ -314,8 +314,16 @@ declare module 'sqlops' { value?: string; actions?: ActionDescriptor[]; status?: StatusIndicator; + + /** + * Returns true if the card is selected + */ selected?: boolean; - cardType: CardType; + + /** + * Card Type, default: Details + */ + cardType?: CardType; } export type InputBoxInputType = 'color' | 'date' | 'datetime-local' | 'email' | 'month' | 'number' | 'password' | 'range' | 'search' | 'text' | 'time' | 'url' | 'week';