Skip to content

data_node_selector class

Displays a list of the Data Node entities that can be selected.

Methods

__init__()

__init__(
    value=None,
    scenario=None,
    datanodes=None,
    multiple=False,
    filter="*",
    sort="*",
    show_search=True,
    show_pins=True,
    display_cycles=True,
    show_primary_flag=True,
    on_change=None,
    height="50vh",
    id=None,
    class_name=None,
) -> None

Create a new data_node_selector element.

Parameters:

Name Type Description Default
value dynamic(Union[DataNode, list[DataNode]])

Bound to the selected DataNode or DataNodes, or None if there is none.

None
scenario dynamic(Union[Scenario, list[Scenario]])

If set, the selector will only show the data nodes owned by this scenario or any scenario in the list.

None
datanodes dynamic(list[Union[DataNode, Scenario, Cycle]])

The list of DataNodes, Scenarios, or Cycles to show.
All all DataNodes, Scenarios, and Cycles are shown if this is None.

None
multiple bool

If True, the user can select multiple data nodes, therefore the value property can hold a list of DataNode objects.

False
filter Union[bool, str, DataNodeFilter, list[Union[str, DataNodeFilter]]]

A list of DataNode property names to filter on.
If False, users cannot filter data nodes.

*
sort Union[bool, str, DataNodeFilter, list[Union[str, DataNodeFilter]]]

A list of DataNode property names to sort on.
If False, do not allow sort.

*
show_search bool

If False, prevents users from searching for data nodes by label.

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.

True
display_cycles bool

If False, the cycles are not shown in the selector.

True
show_primary_flag bool

If False, the primary scenarios are not identified with specific visual hint.

True
on_change Union[str, Callable]

A function or the name of a function that is triggered when a data node is selected.
The parameters of that function are all optional:

  • state (State): the state instance.
  • var_name (str): the variable name.
  • value (DataNode): the selected data node.
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.
These class names will be added to the default taipy_gui_core-[element_type].

None