The first item in each tuple is just a label and is used just for rendering items inside a drop-down.
You can either duplicate them in the menu parameter, making it both a value and a label, like “[(‘product 1’, ‘product 1’), …]”, or just create a map of values to labels, and use it inside your on_change handler.
Regards,
Eugene
···
On Friday, January 26, 2018 at 12:10:14 AM UTC+7, Tony Halik wrote:
I need to have both “display text” and an “unique identity” in the menu tuples so I can use them both in the Dropdown event handler.
I understand it is impossible to get there the first tuple value so I will have to do the work-around you suggested.
Thanks.
···
On Thursday, January 25, 2018 at 6:30:43 PM UTC+1, Eugene Pakhomov wrote:
Hi Tony,
The first item in each tuple is just a label and is used just for rendering items inside a drop-down.
You can either duplicate them in the menu parameter, making it both a value and a label, like “[(‘product 1’, ‘product 1’), …]”, or just create a map of values to labels, and use it inside your on_change handler.
Regards,
Eugene
On Friday, January 26, 2018 at 12:10:14 AM UTC+7, Tony Halik wrote: