Skip to content

Commit

Permalink
chore: prettify search query display (kedacore#850)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisobate authored Aug 3, 2022
1 parent 7ef7ee8 commit 776c9d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions layouts/partials/javascript.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@
filterBtns.forEach((btn) => (btn.disabled = false));
}

// automatically perform wildcard search when the input receives a value
query = keywords.length > 0 ? `${keywords}*` : "";
query = keywords;
initSearchIndex();

// clear out all the scaler item card when in-built scalers are being searched
Expand Down Expand Up @@ -160,7 +159,8 @@
}

function search(keywords) {
const results = index.search(keywords);
// automatically perform wildcard search when the input receives a value
const results = index.search(keywords.length > 0 ? `${keywords}*` : "");

if ("content" in template) {
// show result count
Expand Down

0 comments on commit 776c9d0

Please sign in to comment.