Skip to content

Commit

Permalink
Fixed MaterialListBox - Error Success border style GwtMaterialDesign#764
Browse files Browse the repository at this point in the history
  • Loading branch information
kevzlou7979 committed Jan 23, 2018
1 parent 2a3d8f6 commit b434e8c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,5 @@ public interface CssName {
String DISPLAY_ANIMATION= "display-animation";
String MATERIALIZE_CSS = "materialcss";
String PREFIX = "prefix";
String LISTBOX_WRAPPER = "listbox-wrapper";
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public class MaterialListValueBox<T> extends AbstractValueWidget<T> implements J
private String emptyPlaceHolder = null;

public MaterialListValueBox() {
super(Document.get().createDivElement(), CssName.INPUT_FIELD);
super(Document.get().createDivElement(), CssName.INPUT_FIELD, CssName.LISTBOX_WRAPPER);
}

@Override
Expand Down Expand Up @@ -868,7 +868,7 @@ public ListBox getListBox() {
@Override
public ErrorMixin<AbstractValueWidget, MaterialLabel> getErrorMixin() {
if (errorMixin == null) {
errorMixin = new ErrorMixin<>(this, errorLabel, listBox, label);
errorMixin = new ErrorMixin<>(this, errorLabel, this, label);
}
return errorMixin;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,21 @@ input:-webkit-autofill {
transform: translateY(0);
}

.input-field.listbox-wrapper {
border-bottom: none !important;
box-shadow: none !important;
}

.field-error.input-field.listbox-wrapper input.select-dropdown {
border-bottom: 1px solid #F44336 !important;
box-shadow: 0 1px 0 0 #F44336 !important;
}

.field-success.input-field.listbox-wrapper input.select-dropdown {
border-bottom: 1px solid #4CAF50 !important;
box-shadow: 0 1px 0 0 #4CAF50 !important;
}

/** Loader */
.loader-wrapper {
width: 100%;
Expand Down

0 comments on commit b434e8c

Please sign in to comment.