tamaki.mes.utils.listToDropdown
Description
Converts a plain list into the {'value': ..., 'label': ...} format used by Perspective dropdown
components. Each item becomes one option where value is the item itself and label is the item
converted to a string.
Syntax
tamaki.mes.utils.listToDropdown(l)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
l | List | False | The list of items to format. |
Returns
A List of {'value', 'label'} dictionaries.
Code Examples
# In a binding script transform: turn a plain list of option strings into dropdown options
return tamaki.mes.utils.listToDropdown(propOptions)
# [{'value': 'Red', 'label': 'Red'}, {'value': 'Green', 'label': 'Green'}, ...]