Skip to content

Commit

Permalink
Fixes #431 where pseudo classes are not set when controls are initial…
Browse files Browse the repository at this point in the history
…ly created which resulted in wrong highlighting of settings that are invalid already when loading.
  • Loading branch information
reikjarloekl committed Aug 25, 2022
1 parent 0062c4e commit bbeb2e4
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public void setField(F field) {
@Override
public void init() {
this.initializeParts();
this.updatePseudoStyles();
this.layoutParts();
this.setupEventHandlers();
this.setupValueChangedListeners();
Expand All @@ -100,6 +101,9 @@ public void initializeParts() {
fieldLabel = new Label();
fieldLabel.getStyleClass().addAll(field.getStyleClass());

}

private void updatePseudoStyles() {
updateStyle(INVALID_CLASS, !field.isValid());
updateStyle(REQUIRED_CLASS, field.isRequired());
updateStyle(CHANGED_CLASS, field.hasChanged());
Expand Down

0 comments on commit bbeb2e4

Please sign in to comment.