I am using the routing option set to true. Works g...
# community-help
j
I am using the routing option set to true. Works great. 🙂 But is there a way to know a search was started by loading a "search" url? When I load one it fails to remove some HTML I was removing in the
queryHook
function of the
searchBox
widget... To remove the HTML I was checking wheter the search input field contained some data or not.
j
Yeah, I've found it strange that the queryHook function doesn't get called on page load. So one way to achieve this is to manually check and sanitize query parameters on window.load...
j
So you would create a window.load hook, but what do you mean exactly by "manually check and sanitize query parameters"??
j
The same things you're doing inside queryHook to sanitize the input, you'd do on window load
👍 1
Although if you want to prevent a search from happening at all... I'm not sure how to do that off the top of my head
j
OK, thanks!
j
Looks like this gets triggered on page load as well
j
OK, will try out then!
The searchFunction is the one - it totally works fine with the routing set to true!
j
Awesome!
j
😁