mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-19 19:41:37 -04:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user