I am having an issue where an ampersand is getting stripped out of the search query after the first run.
I had this issue in another spot where I was directly calling an endpoint and grabbing my searchterm from the params and fixed it by getting my search term from SearchContext
Now in another spot where the endpoint is hooked up in a connecter and I am grabbing the search query form the searchContext and in this one spot it doesn't work and strips out the ampersand. Everything sending in is correct.
Sending in hardcoded: "this & that"
const searchQuery = "this & that";
context.driver.setSearchQuery({ searchTerm: searchQuery });
Getting "this " returned:
import { SearchContext } from "@elastic/react-search-ui";
const context = useContext(SearchContext);
const searchTerm = context?.driver.state?.searchTerm;
console.log("searchTerm:", searchTerm);
Is there an argument or a way I can get searchui to ignore the ampersand?