Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Manually open/close Combobox (auto complete)#2300

xsjcTony started this conversation inIdeas
Discussion options

Just as simple as described in the title, maybe via aref or something.

It's a little bit frustrating currently to achieve it

  • If I use CSS to control it (hidden orinvisible), it will result in clicking on options does nothing (value does not change)
  • If I simulate anclick() on theCombox.Button inonFocus, the dropdown will still remain open after I clicked an option by mouse

In conclusion one way always leads to some other issues, so I'm afraid I have to raise a feature request here to get the official support

You must be logged in to vote

Replies: 2 comments

Comment options

I needed to manually close the combobox because I had an item in there that wasn't part of the options, but a link at the bottom.

Initially I had the link placed inside<ComboboxOptions>, which caused the combobox to stay open when clicked.

I moved it outside (while controlling its display with an external wrapper + theopen render prop) but clicking caused the combobox to immediately close, even before processing theclick event.

I didn't want to rely on asetTimeout hack which would be quite unreliable. I ended up patching the library withpatch-package to expose anonClose handler in render props.

I'm not a fan of carrying patches around in projects because it keeps me from confidently updating dependencies, but if you really need this, it can do the job until an official solution comes up.

You must be logged in to vote
0 replies
Comment options

Agreed! Would be nice with some access to the internal machinery to make it possible to imperatively open the combobox. My specific use case is to create a custom combobox input component (used for a very custom multi select setup) and be able to open the combobox when my custom input receives focus, just like the builtin default input component does by invoking the internal machinery.

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Ideas
Labels
None yet
3 participants
@xsjcTony@augustl@sarahdayan

[8]ページ先頭

©2009-2026 Movatter.jp