Support custom search in quicklaunch web search

This commit is contained in:
shamoon 2023-01-31 00:33:30 -08:00
parent 9b8e01971f
commit 1f5912c232
3 changed files with 10 additions and 3 deletions

View file

@ -197,7 +197,13 @@ function Home({ initialSettings }) {
let searchProvider = null;
const searchWidget = Object.values(widgets).find(w => w.type === "search");
if (searchWidget) {
searchProvider = searchProviders[searchWidget.options?.provider];
if (searchWidget.options?.provider === 'custom') {
searchProvider = {
url: searchWidget.options.url
}
} else {
searchProvider = searchProviders[searchWidget.options?.provider];
}
}
useEffect(() => {