mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-07 14:18:47 +00:00
Fix: search opens when losing focus, prevent unnecessary search API calls (#2867)
Co-Authored-By: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
parent
3955743590
commit
3b76772f81
2 changed files with 52 additions and 31 deletions
|
@ -120,7 +120,7 @@ export default function QuickLaunch({
|
|||
});
|
||||
|
||||
if (showSearchSuggestions && searchProvider.suggestionUrl) {
|
||||
if (searchString.trim() !== searchSuggestions[0]) {
|
||||
if (searchString.trim() !== searchSuggestions[0]?.trim()) {
|
||||
fetch(
|
||||
`/api/search/searchSuggestion?query=${encodeURIComponent(searchString)}&providerName=${
|
||||
searchProvider.name ?? "Custom"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue