Dropdown Button with mapped options, how to tell which option was clicked?

Hello folks. I'm using a Dropdown Button with mapped options coming from a datasource. Since I'm not using manual options, I can't set an event handler to each option, also I can't get which button was clicked if I add a component event handler - or at least I couldn't find how to do that.

Help is much appreciated!

Hey @hetote! Are you looking for something like triggeredById perhaps?

https://docs.retool.com/docs/scripting-retool#retrieving-source-of-query-trigger

There is a feature request for fixing this issue here: Dropdown Button should save previously selected option