mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 17:22:20 -05:00
add required indicator (#16777)
This commit is contained in:
@@ -24,7 +24,8 @@ export interface IInputOptions extends vsIInputBoxOptions {
|
||||
* to run the base VS Input Box validation logic. See validate() override
|
||||
* for more info.
|
||||
*/
|
||||
requireForceValidations?: boolean
|
||||
requireForceValidations?: boolean;
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
export class InputBox extends vsInputBox {
|
||||
@@ -60,6 +61,7 @@ export class InputBox extends vsInputBox {
|
||||
if (_sqlOptions && _sqlOptions.type === 'textarea') {
|
||||
this._isTextAreaInput = true;
|
||||
}
|
||||
this.required = !!this._sqlOptions.required;
|
||||
}
|
||||
|
||||
public override style(styles: IInputBoxStyles): void {
|
||||
@@ -123,6 +125,14 @@ export class InputBox extends vsInputBox {
|
||||
return !this.inputElement.hasAttribute('disabled');
|
||||
}
|
||||
|
||||
public get required(): boolean {
|
||||
return this.inputElement.required;
|
||||
}
|
||||
|
||||
public set required(v: boolean) {
|
||||
this.inputElement.required = v;
|
||||
}
|
||||
|
||||
public get hideErrors(): boolean {
|
||||
return this._hideErrors;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user