Added fix for the infinite page refresh in resource Deployment tools page (#13813)

* Added fixed for the infinite loop in resource Deployment tools page
Generating events for select boxes only when the select box value is changed.

* Fixed the check logic in select method

* Reverted to old code and fixed some bugs

* Fixed event generation check logic
This commit is contained in:
Aasim Khan
2020-12-18 10:06:12 -08:00
committed by GitHub
parent 2d6074706a
commit 0b00533f99
2 changed files with 12 additions and 5 deletions

View File

@@ -197,6 +197,10 @@ export class SelectBox extends vsSelectBox {
}
public select(index: number): void {
let selectedOptionIndex = this._optionsDictionary.get(this._selectedOption);
if (selectedOptionIndex === index) { // Not generating an event if the same value is selected.
return;
}
super.select(index);
if (this._dialogOptions !== undefined) {
this._selectedOption = this._dialogOptions[index]?.value;