Skip to content

Commit

Permalink
Longer typeahead lists - increase limit from 5 to 25.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalus committed Jul 14, 2021
1 parent 80999df commit 50ad424
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/segrada/controller/TagController.java
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public String search(@QueryParam("s") String term) {
JSONArray jsonArray = new JSONArray();

// search term finding
for (ITag tag : service.findBySearchTerm(term, 10, true)) {
for (ITag tag : service.findBySearchTerm(term, 25, true)) {
try {
JSONObject jsonObject = new JSONObject();
jsonObject.put("id", tag.getId());
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/js/segrada.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ function escapeHTML(myString) {
confirmKeys: [13], //enter only
typeaheadjs: {
name: 'tags',
limit: 25,
displayKey: 'title',
valueKey: 'title',
source: genericMatcher(urlSegradaTagSearch)
Expand All @@ -484,6 +485,7 @@ function escapeHTML(myString) {
},{
async: true,
name: 'node',
limit: 25,
displayKey: 'title',
valueKey: 'id',
source: nodeMatcher()
Expand All @@ -508,6 +510,7 @@ function escapeHTML(myString) {
},{
async: true,
name: 'file',
limit: 25,
displayKey: 'title',
valueKey: 'id',
source: genericMatcher(urlSegradaFileSearch)
Expand All @@ -531,6 +534,7 @@ function escapeHTML(myString) {
},{
async: true,
name: 'source',
limit: 25,
displayKey: 'title',
valueKey: 'id',
source: genericMatcher(urlSegradaSourceSearch)
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/js/segrada_ol.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@
},{
name: 'address-suggest-' + id,
displayKey: 'title',
limit: 25,
valueKey: 'id',
source: placenamesTokenizer.ttAdapter()
}).bind('typeahead:selected', function(e, datum) {
Expand Down
Loading

0 comments on commit 50ad424

Please sign in to comment.