Skip to content

Commit

Permalink
Merge pull request DSpace#9276 from atmire/w2p-110088_keyboard-to-sel…
Browse files Browse the repository at this point in the history
…ect-values

Search on the label of an authority, not the value in a submission context
  • Loading branch information
alanorth authored Jan 23, 2024
2 parents 6ca4e8f + 5ebe1a9 commit 19049d0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ public Choices getMatches(String query, int start, int limit, String locale) {
int found = 0;
List<Choice> v = new ArrayList<Choice>();
for (int i = 0; i < valuesLocale.length; ++i) {
if (query == null || StringUtils.containsIgnoreCase(valuesLocale[i], query)) {
// In a DCInputAuthority context, a user will want to query the labels, not the values
if (query == null || StringUtils.containsIgnoreCase(labelsLocale[i], query)) {
if (found >= start && v.size() < limit) {
v.add(new Choice(null, valuesLocale[i], labelsLocale[i]));
if (valuesLocale[i].equalsIgnoreCase(query)) {
Expand Down

0 comments on commit 19049d0

Please sign in to comment.