Skip to content

Commit

Permalink
Fine tuned popup behaviour of SearchField.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemmermann committed Aug 25, 2023
1 parent 318cd84 commit d068b5e
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,7 @@ public SearchFieldPopup(SearchField<T> searchField) {
boolean showIt = false;
if (searchField.getSuggestions().size() == 1) {
if (!searchField.isHidePopupWithSingleChoice() || !searchField.getMatcher().apply(searchField.getSuggestions().get(0), evt.getText())) {

// code said "show it" even with only a single suggestion
// but let's see if the suggestion is identical to the typed text, then we really do not want to show it
if (!searchField.getConverter().toString(searchField.getSuggestions().get(0)).equalsIgnoreCase(searchField.getText())) {
showIt = true;
}
showIt = true;
}
} else {
// more than one suggested item, definitely show the popup
Expand Down

0 comments on commit d068b5e

Please sign in to comment.