Add memory inputs validation (#23685)

* memory validation

* Update extensions/mssql/src/objectManagement/localizedConstants.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* Update extensions/mssql/src/objectManagement/localizedConstants.ts

Co-authored-by: Cory Rivera <corivera@microsoft.com>

* rename property to match sts

---------

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
Co-authored-by: Cory Rivera <corivera@microsoft.com>
This commit is contained in:
Barbara Valdez
2023-07-07 12:36:55 -07:00
committed by GitHub
parent 8048cab162
commit a52f86bc48
4 changed files with 24 additions and 8 deletions

View File

@@ -147,8 +147,8 @@ export abstract class DialogBase<DialogResult> {
return this.createInputBox(ariaLabel, textChangeHandler, value, enabled, 'password', width);
}
protected createInputBox(ariaLabel: string, textChangeHandler: (newValue: string) => Promise<void>, value: string = '', enabled: boolean = true, type: azdata.InputBoxInputType = 'text', width: number = DefaultInputWidth): azdata.InputBoxComponent {
const inputbox = this.modelView.modelBuilder.inputBox().withProps({ inputType: type, enabled: enabled, ariaLabel: ariaLabel, value: value, width: width }).component();
protected createInputBox(ariaLabel: string, textChangeHandler: (newValue: string) => Promise<void>, value: string = '', enabled: boolean = true, type: azdata.InputBoxInputType = 'text', width: number = DefaultInputWidth, min?: number, max?: number): azdata.InputBoxComponent {
const inputbox = this.modelView.modelBuilder.inputBox().withProps({ inputType: type, enabled: enabled, ariaLabel: ariaLabel, value: value, width: width, min: min, max: max }).component();
this.disposables.push(inputbox.onTextChanged(async () => {
await textChangeHandler(inputbox.value!);
this.onFormFieldChange();