Skip to content

Commit

Permalink
Merge pull request #94 from ficolo/search-state-revamp
Browse files Browse the repository at this point in the history
Fix autocomplete using ','
  • Loading branch information
ficolo authored Jun 9, 2022
2 parents 487c170 + e75f5ee commit a15f98f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/apis/Search.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export async function autoCompleteFacetOptions(
facetColumn: string,
text: string
) {
const ilikeClause = text.length > 0 ? `, option.ilike.*${text}*` : "";
const ilikeClause = text.length > 0 ? `, option.ilike."*${text}*"` : "";
let response = await fetch(
`${API_URL}/search_facet_options?and=(facet_column.eq.${facetColumn}${ilikeClause})&limit=20&order=option.asc`
);
Expand Down Expand Up @@ -273,7 +273,6 @@ export function useQueryParams() {
const search = new URLSearchParams(useLocation().search);
let searchTermValues: Array<string> = [];
const queryParam = search.get("q");
console.log("queryParam", queryParam);

if (queryParam !== null) {
searchTermValues = queryParam
Expand Down

0 comments on commit a15f98f

Please sign in to comment.