Close dropdown on click

I have a dropdown menu (see below) that I want to close when any menu item is selected. This is not a navigation menu, the user selecting a menu item just changes some stuff on the current page without navigating to a new page.

image

I’m not seeing any setting for this either in the top-level “Dropdown” element or any of its constituent parts.

I would typically solve this by binding the display or conditional rendering to a variable with an action to set the value of that variable, but in this case since the display logic is internal to the component and not exposed I’m not sure how to do this without interfering with the existing logic.

Help?

Thanks!

GD

Hey @gduteaud
Yep, it’s not available on the native component. I think the best way would be to recreate a component with all the interactions you want.

Thanks for confirming. Wow, that’s infuriating! Lately I’m discovering so many cumulative small issues like with WeWeb this that we’re seriously considering just switching over to Vue.

It would be pretty easy to rebuild that component with the behavior that you want. WeWeb gives you all the tools to do that with the creation of component and its scoped variables and workflows — fully in No-Code :slight_smile:

What other issues do you encounter?

It’s a good suggestion, I’m adding it to the improvement ticket of the dropdown.

You can always fork our Vue component from our github and do any modification you wish if you’re already familiar with Vue