mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-26 01:25:38 -05:00
Clean up modal/options dialog disposable use (#9739)
* Fix duplicate options and clean up disposable use * Remove unneeded import * Undo options fix - separating out in different PR
This commit is contained in:
@@ -21,7 +21,7 @@ export interface IOptionElement {
|
||||
}
|
||||
|
||||
export function createOptionElement(option: azdata.ServiceOption, rowContainer: HTMLElement, options: { [name: string]: any },
|
||||
optionsMap: { [optionName: string]: IOptionElement }, contextViewService: IContextViewService, onFocus: (name) => void): void {
|
||||
optionsMap: { [optionName: string]: IOptionElement }, contextViewService: IContextViewService, onFocus: (name) => void): IOptionElement {
|
||||
let possibleInputs: string[] = [];
|
||||
let optionValue = getOptionValueAndCategoryValues(option, options, possibleInputs);
|
||||
let optionWidget: any;
|
||||
@@ -63,8 +63,10 @@ export function createOptionElement(option: azdata.ServiceOption, rowContainer:
|
||||
}
|
||||
inputElement = findElement(rowContainer, 'input');
|
||||
}
|
||||
optionsMap[option.name] = { optionWidget: optionWidget, option: option, optionValue: optionValue };
|
||||
const optionElement = { optionWidget: optionWidget, option: option, optionValue: optionValue };
|
||||
optionsMap[option.name] = optionElement;
|
||||
inputElement.onfocus = () => onFocus(option.name);
|
||||
return optionElement;
|
||||
}
|
||||
|
||||
export function getOptionValueAndCategoryValues(option: azdata.ServiceOption, options: { [optionName: string]: any }, possibleInputs: string[]): any {
|
||||
|
||||
Reference in New Issue
Block a user