Skip to content

feat(auto-complete): expose openMenu and closeMenu#521

Merged
kelsos merged 1 commit intorotki:mainfrom
kelsos:feat/auto-complete-open-close-menu
Apr 27, 2026
Merged

feat(auto-complete): expose openMenu and closeMenu#521
kelsos merged 1 commit intorotki:mainfrom
kelsos:feat/auto-complete-open-close-menu

Conversation

@kelsos
Copy link
Copy Markdown
Member

@kelsos kelsos commented Apr 27, 2026

Summary

  • Adds openMenu() and closeMenu() to RuiAutoComplete's defineExpose, so consumers can programmatically toggle the dropdown.
  • Removes the need for the synthetic input-event workaround when hide-search-input is active (the native input is display: none, so calling .focus() is a no-op and there is no public way to re-open the menu).
  • Adds a unit test covering the new exposed methods.

Closes #517

Test plan

  • pnpm run typecheck
  • pnpm run test:run --testNamePattern="openMenu and closeMenu"

Allows consumers to programmatically toggle the dropdown without
dispatching synthetic input events on the hidden input. Useful when
`hide-search-input` is set and the native input is `display: none`.

Closes rotki#517
@kelsos kelsos requested a review from a team as a code owner April 27, 2026 20:43
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.88%. Comparing base (3b153a3) to head (607759e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #521      +/-   ##
==========================================
+ Coverage   84.87%   84.88%   +0.01%     
==========================================
  Files         143      143              
  Lines        5209     5213       +4     
  Branches     1553     1553              
==========================================
+ Hits         4421     4425       +4     
  Misses        788      788              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kelsos kelsos merged commit 607759e into rotki:main Apr 27, 2026
5 checks passed
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.

RuiAutoComplete: expose a way to programmatically open the menu

2 participants