Skip to content

fix(search): Fix search suggestions not displaying#1

Open
genspark-ai-developer[bot] wants to merge 1 commit intomainfrom
build_runner
Open

fix(search): Fix search suggestions not displaying#1
genspark-ai-developer[bot] wants to merge 1 commit intomainfrom
build_runner

Conversation

@genspark-ai-developer
Copy link

Problem

  • Search suggestions were not displaying despite successful network requests
  • getSuggests() had inverted logic, returning empty array when text changed
  • SearchAnchor's suggestionsBuilder wasn't refreshed after loading suggestions
  • Network requests succeeded but UI never updated

Solution

  • Fixed condition logic: now triggers loading when query changes
  • Returns current _suggests list instead of empty array
  • Call _searchController.openView() after loading to refresh suggestion list
  • This ensures SearchAnchor rebuilds with new suggestions

Root Cause

The method returned [] immediately, then loaded suggestions asynchronously, but had no mechanism to refresh the UI after loading.

Testing

  • Manually tested search suggestions
  • Verified network logs show successful requests
  • Confirmed suggestions now display in UI after loading

@github-actions github-actions bot force-pushed the build_runner branch 28 times, most recently from ee12379 to 0190834 Compare December 15, 2025 07:25
@github-actions github-actions bot force-pushed the build_runner branch 2 times, most recently from ac24bf6 to fdeb352 Compare December 16, 2025 15:21
@github-actions github-actions bot force-pushed the build_runner branch 20 times, most recently from cf43446 to 247dbdc Compare December 22, 2025 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant