Skip to content

Use configured searchFields in search 'get result' #6023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/definitions/modules/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,7 @@ $.fn.search = function(parameters) {
},
result: function(value, results) {
var
lookupFields = ['title', 'id'],
result = false
result = false
;
value = (value !== undefined)
? value
Expand All @@ -439,7 +438,7 @@ $.fn.search = function(parameters) {
module.debug('Finding result that matches', value);
$.each(results, function(index, category) {
if($.isArray(category.results)) {
result = module.search.object(value, category.results, lookupFields)[0];
result = module.search.object(value, category.results)[0];
// don't continue searching if a result is found
if(result) {
return false;
Expand All @@ -449,7 +448,7 @@ $.fn.search = function(parameters) {
}
else {
module.debug('Finding result in results object', value);
result = module.search.object(value, results, lookupFields)[0];
result = module.search.object(value, results)[0];
}
return result || false;
},
Expand Down