Dropdown Button should save previously selected option

Mapped options for the Dropdown Button are currently unusable. Here is why:

The Dropdown button currently works for manual items because event handlers can be added to each individual action:

The mapped options are not able to do this. It would be great if you could do something like this (like you can with the select component):

Unfortunately, there is no such option in the component:

I've encountered this issue as well. It could probably be solved if the dropdown button offered some kind of "selectedItem" field so that code could access whichever option the user ended up clicking.

hello @Kade333 and @aivajoe!

When Dropdown Button or Split Button has its actions configured in "Mapped" mode the item that was clicked as well as its index (as i) are available in Event Handlers.

Here's an example of how an array of strings could be mapped to URLs:

However, our documentation is unclear, and it looks like this is not working for the "Run script" Event Handler. I'll file a bug now and will report back when this is resolved.

Thanks for the feedback!
Alexi

3 Likes