ListFieldV1

toloka.client.project.template_builder.fields.ListFieldV1 | Source code

ListFieldV1(
self,
data: Optional[BaseComponent] = None,
render: Optional[BaseComponent] = None,
*,
button_label: Optional[Any] = None,
direction: Optional[Union[BaseComponent, ListDirection]] = None,
editable: Optional[Union[BaseComponent, bool]] = None,
max_length: Optional[Union[BaseComponent, float]] = None,
size: Optional[Union[BaseComponent, ListSize]] = None,
hint: Optional[Any] = None,
label: Optional[Any] = None,
validation: Optional[BaseComponent] = None,
version: Optional[str] = '1.0.0'
)

A component that allows a Toloker to add and remove list items, such as text fields.

Use RelativeData(toloka.client.project.template_builder.data.RelativeData) in list items, otherwise all list items will change the same data.

For more information, see field.list.

Parameters description

ParametersTypeDescription
dataOptional[BaseComponent]

A data path.

renderOptional[BaseComponent]

A template for the list item.

button_labelOptional[Any]

A text on a button that adds the list item.

directionOptional[Union[BaseComponent, ListDirection]]

The direction of the list:

  • horizontal
  • vertical
editableOptional[Union[BaseComponent, bool]]
  • True — A Toloker can add or remove list items.
  • False — The list can't be changed.

Default value: True.

max_lengthOptional[Union[BaseComponent, float]]

The maximum number of list items.

sizeOptional[Union[BaseComponent, ListSize]]

The distance between list items:

  • s — Small.
  • m — Medium.

Default value: m.

hintOptional[Any]

A hint.

labelOptional[Any]

A label above the component.

validationOptional[BaseComponent]

Validation rules.

Last updated: August 28, 2023

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming