Skip to content

Commit

Permalink
Added comment related to running the formatting code with Platform.ru…
Browse files Browse the repository at this point in the history
…nLater().
  • Loading branch information
dlemmermann committed Dec 1, 2023
1 parent fae015a commit 1ddc447
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ protected void layoutChildren(double x, double y, double w, double h) {
}
});

// Platform.runLater() is important or formatting will not work
ChangeListener<Object> updateFormattedPhoneNumberListener = (obs, oldV, newV) -> Platform.runLater(() -> formatter.setFormattedPhoneNumber(getRawPhoneNumber()));
rawPhoneNumberProperty().addListener(updateFormattedPhoneNumberListener);
countryCodeVisibleProperty().addListener(updateFormattedPhoneNumberListener);
Expand Down

0 comments on commit 1ddc447

Please sign in to comment.