toloka.client.project.template_builder.fields.SelectFieldV1
| Source code
SelectFieldV1( self, data: Optional[BaseComponent] = None, options: Optional[Union[BaseComponent, List[Union[BaseComponent, Option]]]] = None, *, placeholder: Optional[Any] = None, hint: Optional[Any] = None, label: Optional[Any] = None, validation: Optional[BaseComponent] = None, version: Optional[str] = '1.0.0')
Button for selecting from a drop-down list.
Use this component when the list is long and only one option can be chosen.
For short lists (2-4 items), it's better to use field.radio-group or field.button-radio-group, where all the options are visible at once.
To allow selecting multiple options, use the field.checkbox-group component.
Parameters | Type | Description |
---|---|---|
data | Optional[BaseComponent] | Data with values that will be processed or changed. |
options | Optional[Union[BaseComponent, List[Union[BaseComponent, Option]]]] | Options to choose from. |
placeholder | Optional[Any] | The text that will be displayed if none of the options is selected. |
hint | Optional[Any] | Hint text. |
label | Optional[Any] | Label above the component. |
validation | Optional[BaseComponent] | Validation based on condition. |