searchBoxConfig
searchBoxConfig
is controlling the behavior of the search box on search.
Options
If using Sitefinity CMS the Search box configuration could be updated by adding JSON object with the options the Data filed of HawksearchBox widget designer Advanced options. Example:
{"_searchBoxConfig":{"reloadOnEmpty":false,"redirectOnEmpty":false,"redirectToCurrentPage":false}
updating the config with javascript:
const config = { ... searchBoxConfig: { reloadOnEmpty: true, redirectOnEmpty: true, redirectToCurrentPage: true }, ... }; var widget = HawksearchVue.createWidget(component, { config: config}); HawksearchVue.initialSearch(widget);
reloadOnEmpty
default value
false
if
true
refresh the search results with an empty keyword, but keeps all other facet selections. This is available if a results widget is dropped on the same page.
redirectOnEmpty
default value
false
if
true
redirects to the results page even if the search field doesn’t have a keyword
redirectToCurrentPage
default value
false
if
true
and If the set redirect page is the current one, forces the page to reload