scenario_selector class
Select scenarios from the list of all scenario entities.
Methods¶
__init__() ¶
__init__(
value=None,
scenarios=None,
multiple=False,
filter="*",
show_search=True,
sort="*",
show_add_button=True,
display_cycles=True,
show_primary_flag=True,
show_pins=False,
on_change=None,
show_dialog=True,
on_creation=None,
height="50vh",
id=None,
class_name=None,
) -> None
Create a new scenario_selector element.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
dynamic(Union[Scenario, list[Scenario]])
|
Bound to the selected |
None
|
scenarios
|
dynamic(list[Union[Scenario, Cycle]])
|
None
|
|
multiple
|
bool
|
If True, the user can select multiple scenarios, therefore the value property can hold a list of |
False
|
filter
|
Union[bool, str, ScenarioFilter, list[Union[str, ScenarioFilter]]]
|
One or multiple |
*
|
show_search
|
bool
|
If False, prevents users from searching for scenarios by label. |
True
|
sort
|
Union[bool, str, ScenarioFilter, list[Union[str, ScenarioFilter]]]
|
A list of |
*
|
show_add_button
|
bool
|
If False, the button to create a new scenario is not displayed. |
True
|
display_cycles
|
bool
|
If False, the cycles are not shown. |
True
|
show_primary_flag
|
bool
|
If False, the primary scenarios are not identified with specific visual hint. |
True
|
show_pins
|
bool
|
If True, a pin is shown on each item of the selector and allows to restrict the number of displayed items. |
False
|
on_change
|
Union[str, Callable]
|
None
|
|
show_dialog
|
bool
|
If True, a dialog is shown when the user click on the 'Add scenario' button. |
True
|
on_creation
|
Union[str, Callable]
|
A function or the name of a function that is triggered when a scenario is about to be created.
|
None
|
height
|
str
|
The maximum height, in CSS units, of the control. |
50vh
|
id
|
str
|
The identifier that will be assigned to the rendered HTML component. |
None
|
class_name
|
dynamic(str)
|
The list of CSS class names associated with the generated HTML Element. |
None
|