Replies: 9 comments 17 replies
-
I found a workaround :
then use onFocus and onBlur on a div inside the Combobox
and finally
|
Beta Was this translation helpful? Give feedback.
-
Multiple timeouts gets added in this case the options closes unexpectedly.
…On Thu, Jun 9, 2022, 02:15 Jon Bellah ***@***.***> wrote:
Ran into this same issue. I was able to workaround the onBlur race
condition by throwing a timeout on the close... not the most elegant
solution but seems to be working okay so far.
onBlur={() => setTimeout(() => setOpen(false), 100)}
—
Reply to this email directly, view it on GitHub
<#1205 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXR23A7TDFUYS2K6PQH6UTTVOEA5RANCNFSM5QEQOOZQ>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
my workaround for this issue:
|
Beta Was this translation helpful? Give feedback.
-
I approached it this way:
|
Beta Was this translation helpful? Give feedback.
-
Hmm. What about if I want to open the Combobox when clicking the input, but only if it's not already open |
Beta Was this translation helpful? Give feedback.
-
I think a reasonable feature would be to allow people to control the state of the open property without forcing them to re-create the internal state changes that come out of the box. For example, I want to be able to open the ComboBox programmatically, but I don't want to lose all the other neat features that already cause the ComboBox to automatically open or close. It seems like the closest thing that we have is the ability to open the ComboBox by ".click"-ing it, and there are some really good threads above discussing how to do that. However, this is obviously a pretty brittle workaround, since it depends on including the The easiest solution I can think of from a design perspective is exposing some render props called |
Beta Was this translation helpful? Give feedback.
-
Headlessui already merged a PR, but they haven't been released yet. If you install the @insiders version , you can use a props named 'immediate' that should do exactly what you need |
Beta Was this translation helpful? Give feedback.
-
In my opinion, the best way to achieve this is rendering |
Beta Was this translation helpful? Give feedback.
-
I updated my package to version 2.0.3 and now the |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm using combobox and I'd like that a click in the input causes the dropdown to open.
Is this comportement already implemented and I'm doing something wrong or is it normal that nothing happens on click?
Beta Was this translation helpful? Give feedback.
All reactions