fix the input box validation (#15634)

* fix the input box validation

* fix one more place
This commit is contained in:
Alan Ren
2021-06-08 14:24:50 -07:00
committed by GitHub
parent a61462a2c0
commit d91660b66f
9 changed files with 23 additions and 24 deletions

View File

@@ -307,11 +307,11 @@ export class ServerGroupDialog extends Modal {
private validateInputs(): boolean {
const renderedDialog = this.withRenderedDialog;
let validate = renderedDialog.groupNameInputBox.validate();
if (!validate) {
const isNameValid = renderedDialog.groupNameInputBox.validate() === undefined;
if (!isNameValid) {
renderedDialog.groupNameInputBox.focus();
}
return validate;
return isNameValid;
}
// initialize the view based on the current state of the view model