Dropdown Container + Dynamic Buttons

0
  I’m building a user interface that requires a dynamic set of buttons to be rendered within a dropdown. I’ve accomplished this by placing a Gallery within the dropdown. (Listview works also) The issue is that when a button is clicked, the dropdown does not automatically close. This is in contrast to the behavior of buttons placed within a dropdown container at design-time, where those buttons automatically trigger both the event (microflow, nanoflow, etc) AND the dropdown closure.   In my proof-of-concept screenshots below, the “Dynamic” buttons will not close the dropdown, whereas the Hardcoded buttons will. This is waaaaaay beyond my knowledge of javascript / jquery frontend programming.   any thoughts? thanks      
asked
2 answers
0

HI

 

You can use javascript for this. 

For each button click call Nanoflow inside nanoflow use javascript which will trigger dropdown click()

 

Regards,

Anahit 

answered
0

Here’s what I ended up doing.

I created a Javascript Action with this code:

document.getElementsByClassName("open")[0].getElementsByClassName("dropdown-menu")[0].click()


For some reason I couldn’t get it to work with jQuery using the browser console, so just went with this.

 

 

answered