Skip to main content
Question

Combobox component that swaps variants when pressed does not open overlay when pressed

  • November 13, 2024
  • 1 reply
  • 27 views

Tom_Slade

I have a dropdown button, which I want to change in appearance when pressed. This behavior is universal, so I’ve set it up on the component itself.


For individual use cases of this dropdown button, I place an instance in my prototype, then create a new frame for the dropdown’s contents. I then add an instance-level interaction to open this frame as an overlay on-click.

This tends to work on the first click, though the variant appearance change in the button doesn’t happen. Then in subsequent clicks, the variant appearance changes but the overlay doesn’t open. It’s as if the appearance-changing interaction is blocking the overlay-opening interaction.

This topic has been closed for replies.

1 reply

Darlynton
  • New Participant
  • 5 replies
  • November 19, 2024

Whenever a click trigger opens an overlay, the next click only closes that overlay (assuming you’ve set the overlay to “close when clicking outside”).
This means that the second click cannot trigger the combobox appearance variant back to default because it just closed the overlay. [Notice how the cursor icon changes from a click-finger to an arrow when an overlay is open]

The other option is to make a new component out of the combobox instance that shows/hides the dropdown options.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings