mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 09:35:40 -05:00
Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)
* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 * disable strict null check
This commit is contained in:
@@ -28,7 +28,8 @@ export interface IInputOptions extends IInputBoxStyles {
|
||||
readonly type?: string;
|
||||
readonly validationOptions?: IInputValidationOptions;
|
||||
readonly flexibleHeight?: boolean;
|
||||
readonly actions?: IAction[];
|
||||
readonly actions?: ReadonlyArray<IAction>;
|
||||
|
||||
|
||||
// {{SQL CARBON EDIT}} Candidate for addition to vscode
|
||||
readonly min?: string;
|
||||
@@ -99,7 +100,7 @@ export class InputBox extends Widget {
|
||||
private placeholder: string;
|
||||
private ariaLabel: string;
|
||||
private validation?: IInputValidator;
|
||||
private state: string | null = 'idle';
|
||||
private state: 'idle' | 'open' | 'closed' = 'idle';
|
||||
private cachedHeight: number | null;
|
||||
|
||||
// {{SQL CARBON EDIT}} - Add showValidationMessage and set inputBackground, inputForeground, and inputBorder as protected
|
||||
@@ -422,8 +423,6 @@ export class InputBox extends Widget {
|
||||
let div: HTMLElement;
|
||||
let layout = () => div.style.width = dom.getTotalWidth(this.element) + 'px';
|
||||
|
||||
this.state = 'open';
|
||||
|
||||
this.contextViewProvider.showContextView({
|
||||
getAnchor: () => this.element,
|
||||
anchorAlignment: AnchorAlignment.RIGHT,
|
||||
@@ -454,18 +453,25 @@ export class InputBox extends Widget {
|
||||
|
||||
return null;
|
||||
},
|
||||
onHide: () => {
|
||||
this.state = 'closed';
|
||||
},
|
||||
layout: layout
|
||||
});
|
||||
|
||||
this.state = 'open';
|
||||
}
|
||||
|
||||
private _hideMessage(): void {
|
||||
if (!this.contextViewProvider || this.state !== 'open') {
|
||||
if (!this.contextViewProvider) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.state = 'idle';
|
||||
if (this.state === 'open') {
|
||||
this.contextViewProvider.hideContextView();
|
||||
}
|
||||
|
||||
this.contextViewProvider.hideContextView();
|
||||
this.state = 'idle';
|
||||
}
|
||||
|
||||
private onValueChange(): void {
|
||||
@@ -555,7 +561,7 @@ export class InputBox extends Widget {
|
||||
this.contextViewProvider = undefined;
|
||||
this.message = null;
|
||||
this.validation = undefined;
|
||||
this.state = null;
|
||||
this.state = null!; // StrictNullOverride: nulling out ok in dispose
|
||||
this.actionbar = undefined;
|
||||
|
||||
super.dispose();
|
||||
|
||||
Reference in New Issue
Block a user