Skip to content

Commit 5625527

Browse files
author
wassx
committed
Improved clear method by adding removeStyle("active") to reset text
input for initial state
1 parent 381f5fd commit 5625527

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/gwt/material/design/client/ui/MaterialTextBox.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ protected void onAttach() {
7878
customLabel.getElement().setAttribute("for", name);
7979
}
8080

81-
82-
8381
public void setInvalid() {
8482
backToDefault();
8583
txtBox.getElement().addClassName("invalid");
@@ -98,6 +96,7 @@ public void setValid() {
9896
public void clear() {
9997
txtBox.setText("");
10098
backToDefault();
99+
customLabel.removeStyleName("active");
101100
}
102101

103102
public void backToDefault() {

0 commit comments

Comments
 (0)