mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 01:25:36 -05:00
Support position property in editor component (#2314)
* Support position property in editor component - This needs to be set directly on the editor component so cannot just use CSSStyles feature - Given its importance to this scenario, it also warrants a dedicated property. * Fix window resize when action bar clicked * Renamed per Abbie's suggestion * Changed name to clarify the comments
This commit is contained in:
@@ -13,10 +13,14 @@ import { DialogPane } from 'sql/platform/dialog/dialogPane';
|
||||
import { ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
export interface LayoutRequestParams {
|
||||
modelViewId?: string;
|
||||
alwaysRefresh?: boolean;
|
||||
}
|
||||
export interface DialogComponentParams extends IBootstrapParams {
|
||||
modelViewId: string;
|
||||
validityChangedCallback: (valid: boolean) => void;
|
||||
onLayoutRequested: Event<string>;
|
||||
onLayoutRequested: Event<LayoutRequestParams>;
|
||||
dialogPane: DialogPane;
|
||||
}
|
||||
|
||||
@@ -50,8 +54,8 @@ export class DialogContainer implements AfterViewInit {
|
||||
@Inject(forwardRef(() => ElementRef)) private _el: ElementRef,
|
||||
@Inject(IBootstrapParams) private _params: DialogComponentParams) {
|
||||
this.modelViewId = this._params.modelViewId;
|
||||
this._params.onLayoutRequested(e => {
|
||||
if (this.modelViewId === e) {
|
||||
this._params.onLayoutRequested(layoutParams => {
|
||||
if (layoutParams && (layoutParams.alwaysRefresh || layoutParams.modelViewId === this.modelViewId)) {
|
||||
this.layout();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user