Skip to main content
Question

Reverse action on second click


Arthur_Arakelian

Is there a way to create a reverse action on second click of the same element? For example i want to close the popover by clicking the same avatar icon
Screen-Recording-2021-07-30-at-08.45

This topic has been closed for comments

9 replies

Gleb
  • Power Member
  • 4707 replies
  • July 30, 2021

From the overlay, add the click trigger with the action “Close overlay”.


Arthur_Arakelian

I want to place the action on the same “avatar” element, so in this case i can’t create the “Close overlay” action


Gleb
  • Power Member
  • 4707 replies
  • July 30, 2021

Overlays don’t work like that, when the overlay is open you can only interact with it, not what’s below. Why do you want to place the close action specifically on that element? What’s the difference?


Arthur_Arakelian

okay… let’s say i want to recreate the same dropdown element from your website 😃
Screen-Recording-2021-07-30-at-10.41
is this possible to achieve exactly the same result …to close dropdown by clicking the arrow …not the dropdown itself, not the space around …only the arrow.


Gleb
  • Power Member
  • 4707 replies
  • July 30, 2021

Of course. Set the “Close overlay” action to the arrow which is a part of the overlay.


Arthur_Arakelian

Nope, for me it’s not a part of the overlay (dropdown/popover or whatever it is), i want it to be a separate element. And for me it’s a minus and kinda strange that “close overlay” interaction works for itself only
image
would be good if it will work like “open overlay” …both with itself and other components like this
image

So as i see it just has its own logic and functionality, maybe not what i’m looking for but it is what it is)) anyways thank you Gleb for your replies, much appreciated mate 🙌


Gleb
  • Power Member
  • 4707 replies
  • July 30, 2021

But it needs to be in order for this to work. 🙂 You can create a 0.1% transparent rectangle in that place in the overlay if you don’t want to overlay the icon.


Arthur_Arakelian

yeah it can work, not bad trick …but just a trick))) …but i’d like to see more native flexible functionality) i actually got what needed by using interactive components, just created two variants with open and closed popover states, but anyways it is still not the optimal solution in my opinion


  • 0 replies
  • August 29, 2021

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.


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