mirror of
https://github.com/simon987/sist2.git
synced 2025-04-16 00:46:43 +00:00
do 'should' search if search bar is empty
This commit is contained in:
parent
c063d87232
commit
69f0c1f2cf
File diff suppressed because one or more lines are too long
@ -204,7 +204,8 @@ function search() {
|
||||
searchResults.appendChild(preload);
|
||||
|
||||
let query = searchBar.value;
|
||||
let condition = $("#barToggle").prop("checked") ? "must" : "should";
|
||||
let empty = query === "";
|
||||
let condition = $("#barToggle").prop("checked") && !empty ? "must" : "should";
|
||||
let filters = [
|
||||
{range: {size: {gte: size_min, lte: size_max}}},
|
||||
{terms: {index: selectedIndices}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user