Close dropdown by clicking on dropdown list

Hey guys!

I’m suffering and I need your help! Here’s the link to my project
https://preview.webflow.com/preview/crypto-lp-dashboard-ceb7a5d1456cdd234b4?utm_source=crypto-lp-dashboard-ceb7a5d1456cdd234b4&preview=905f56ec6744d9863d6c9f9328b75859

  1. There’re two dropdowns on the first screen and when you hover it dropdown opens its list. And my goal close it by clicking on one of dropdown’s item in that list. But I can’t figure out how to do it.

  2. “Users” screen is also dropdowns, but in this case my goal - button “Update” should be inactive and in case if user make changes in role → button highlighted in active state

I would be super appreciated if you can help
Victoria

Select Dropdown Markets layer

Go to interactions / click on the mouse click element trigger that has been setup.

Set first click action to open

Set second click action to close

In first click action make sure the actions are as follows:

Dropdown List - set hide/show to hidden (set as initial state)
—— [space]
Dropdown List - hide/show set to display: block
Icon arrow (leave as it is)

In close action make sure it shows the following:

Dropdown List - set hide/show to hidden
— [space]
Icon Arrow (leave it as it is)

Next click on dropdown list in the layers panel. Go to interactions. Add a mouse click interaction and on first click select close as the animation. Leave the second click option blank

I did a test and it means that the dropdown shows and hides on click of the Coinbase Pro text, but also it closes when any item of the dropdown has been chosen.

Also note that you should be able to use the same interactions for multiple dropdowns if using the same class naming for the dropdowns and selecting the right option to affect them e.g. select ‘Affect Class / only children with this class’.

This technique doesn’t seem to work - tried to close on click on the list and any of the links inside and nothing happens