Skip to content

Commit

Permalink
Added queryType
Browse files Browse the repository at this point in the history
  • Loading branch information
jokd committed Dec 7, 2023
1 parent 804cd65 commit 4b366fc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/controls/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ const Search = function Search(options = {}) {
url,
queryParameterName = 'q',
autocompletePlacement,
searchlistOptions = {}
searchlistOptions = {},
queryType
} = options;

const searchlistPlacement = searchlistOptions.placement;
Expand Down Expand Up @@ -524,6 +525,9 @@ const Search = function Search(options = {}) {
if (complete) {
queryUrl += '&c=true';
}
if (queryType) {
queryUrl += `&t=${queryType}`;
}
fetch(queryUrl)
.then(response => response.json())
.then((data) => {
Expand Down

0 comments on commit 4b366fc

Please sign in to comment.