Skip to content

Commit 17557c4

Browse files
user has to click OK button twice to submit a form
1 parent 895cf17 commit 17557c4

File tree

1 file changed

+3
-7
lines changed
  • PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/java/com/microsoft/azure/toolkit/intellij/common

1 file changed

+3
-7
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/java/com/microsoft/azure/toolkit/intellij/common/AzureFormInputComponent.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import com.microsoft.azure.toolkit.lib.common.task.AzureTaskManager;
1414

1515
import javax.accessibility.AccessibleRelation;
16-
import javax.annotation.Nonnull;
1716
import javax.annotation.Nullable;
1817
import javax.swing.*;
1918
import java.util.Objects;
@@ -28,13 +27,10 @@ default JComponent getInputComponent() {
2827
return (JComponent) this;
2928
}
3029

31-
@Nonnull
3230
@Override
33-
default AzureValidationInfo validateInternal(T value) {
34-
if (!this.getInputComponent().isEnabled() || !this.getInputComponent().isVisible()) {
35-
return AzureValidationInfo.success(this);
36-
}
37-
return AzureFormInput.super.validateInternal(value);
31+
default boolean needValidation() {
32+
final JComponent comp = this.getInputComponent();
33+
return AzureFormInput.super.needValidation() && comp.isEnabled() && comp.isVisible();
3834
}
3935

4036
@Override

0 commit comments

Comments
 (0)