SimonBiggs / scriptedforms

Quickly create live-update GUIs for Python packages using Markdown and simple HTML elements.
Apache License 2.0
508 stars 34 forks source link

variable-dropdown - dropdown labels vs values #301

Open psychemedia opened 5 years ago

psychemedia commented 5 years ago

The ipywidgets dropdown allows a list of values to be passed to the dropdown to be displayed and used as selection values, or a dict, in which case the keys are the displayed elements and the values are the values returned from the selection/dropdown widget.

It would be useful if variable-dropdown also supported the use dicts as well as lists in a similar way.

SimonBiggs commented 5 years ago

Ahh that is neat. I'm not going to get a chance to implement that in the near future. More than happy to accept a pull request though.

On Thu., 7 Mar. 2019, 12:04 am Tony Hirst, notifications@github.com wrote:

The ipywidgets dropdown allows a list of values to be passed to the dropdown to be displayed and used as selection values, or a dict, in which case the keys are the displayed elements and the values are the values returned from the selection/dropdown widget.

It would be useful if variable-dropdown also supported the use dicts as well as lists in a similar way.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SimonBiggs/scriptedforms/issues/301, or mute the thread https://github.com/notifications/unsubscribe-auth/AGQVe_gdaa439hQ1NzpycQx2OWYD837nks5vT7zigaJpZM4bg1PI .

psychemedia commented 5 years ago

Looks like the relevant bit(?) is in Angular Typescript? That is completely alien to me atm unfortunately...