Skip to content

Commit

Permalink
Sort headers in dropdowns to ignore case
Browse files Browse the repository at this point in the history
  • Loading branch information
QuincyCantu committed Nov 13, 2024
1 parent 9dda8b7 commit 1ff1880
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import edu.colorado.cires.pace.data.object.base.Translator;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
Expand Down Expand Up @@ -42,7 +43,7 @@ public String[] getHeaderOptions() {
public void setHeaderOptions(String[] headerOptions) {
this.headerOptions = Arrays.stream(headerOptions)
.filter(StringUtils::isNotEmpty)
.collect(Collectors.toSet()).stream().sorted().toArray(String[]::new);
.collect(Collectors.toSet()).stream().sorted(Comparator.comparing(String::new, String.CASE_INSENSITIVE_ORDER)).toArray(String[]::new);
this.headerOptions = ArrayUtils.addFirst(this.headerOptions, null);
updateHeaderOptions(this.headerOptions);
}
Expand Down

0 comments on commit 1ff1880

Please sign in to comment.