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 |
---|---|---|---|
|
Union[Scenario, list[Scenario]]
|
Bound to the selected |
None
|
|
list[Union[Scenario,Cycle]]
|
None
|
|
|
bool
|
If True, the user can select multiple scenarios, therefore the value property can hold a list of |
False
|
|
Union[bool, str, ScenarioFilter, list[Union[str, ScenarioFilter]]]
|
One or multiple |
*
|
|
bool
|
If False, prevents users from searching for scenarios by label. |
True
|
|
Union[bool, str, ScenarioFilter, list[Union[str, ScenarioFilter]]]
|
A list of |
*
|
|
bool
|
If False, the button to create a new scenario is not displayed. |
True
|
|
bool
|
If False, the cycles are not shown. |
True
|
|
bool
|
If False, the primary scenarios are not identified with specific visual hint. |
True
|
|
bool
|
If True, a pin is shown on each item of the selector and allows to restrict the number of displayed items. |
False
|
|
Union[str, Callable]
|
None
|
|
|
bool
|
If True, a dialog is shown when the user click on the 'Add scenario' button. |
True
|
|
Union[str, Callable]
|
A function or the name of a function that is triggered when a scenario is about to be created.
|
None
|
|
str
|
The maximum height, in CSS units, of the control. |
50vh
|
|
str
|
The identifier that will be assigned to the rendered HTML component. |
None
|
|
str
|
The list of CSS class names associated with the generated HTML Element. |
None
|