taipy icon indicating copy to clipboard operation
taipy copied to clipboard

Data Node Selector - Filter on selected scenario

Open FlorianJacta opened this issue 2 years ago • 2 comments

New Feature / Improvement

Filtering the Data Node selector by scenario would allow the user to see Data Nodes of the selected scenario without all the others. It can be really useful in an application. It would also create a "bridge" between the Scenario selector and Data Node selector.

Proposed syntax, for example:

<|{data_node}|data_node_selector|scenario={scenario}|>

This would show only Data nodes corresponding to the selected scenario ('scenario').

Taipy version: Taipy 2.3.0

FlorianJacta avatar Jun 19 '23 10:06 FlorianJacta

We could also add a generic filter. It can be extremely useful to not display every Data Node (some can be irrelevant). The selector should call this function for each Data Node, and the function should return True to display the Data Node in the Data Node Selector.

Example of code:

<|{datanode}|data_node_selector|filter_scenario={scenario}|filter={my_filter}|>

Example of function:

def my_filter(data_node:DataNode) -> bool:
    return data_node.config_id == "TOTO"

FlorianJacta avatar Sep 01 '23 14:09 FlorianJacta

The generic and scenario filters should be applied with an AND operator.

jrobinAV avatar Sep 01 '23 14:09 jrobinAV