Skip to content

Commit

Permalink
DropDownListWidget: Fix the search string not being case-insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
maruohon committed Jul 2, 2022
1 parent 9a3a928 commit 2f6d1a7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.function.Function;
import java.util.function.IntSupplier;
import java.util.function.Supplier;
Expand Down Expand Up @@ -556,7 +557,8 @@ protected void updateFilteredEntries(String searchText)

protected boolean entryMatchesFilter(T entry, String filterText)
{
return filterText.isEmpty() || this.getDisplayString(entry).toLowerCase().contains(filterText);
return filterText.isEmpty() ||
this.getDisplayString(entry).toLowerCase(Locale.ROOT).contains(filterText.toLowerCase(Locale.ROOT));
}

protected int getRequiredWidth(List<T> entriesIn,
Expand Down

0 comments on commit 2f6d1a7

Please sign in to comment.