class documentation

class TreeSelectionView(View): (source)

Constructor: TreeSelectionView(**options)

View In Hierarchy

Displays a tree selection checkbox groups.

Examples:

import fiftyone.operators.types as types

structure = [
    ["group_id_1", ["sample_id_1", "sample_id_2"]],
    ["group_id_2", ["sample_id_3", "sample_id_4", "sample_id_5"], ["group_id_8", ["sample_id_6"]]],
]

tree_view = types.TreeSelectionView(
    data=structure # this data represents the basic group structure;
)

panel.view('exact_duplicate_selections', view=tree_view, on_change=self.toggle_select)

def toggle_select(self, ctx):
    selected = ctx.params['value']
    print('selected samples:', selected)
Parameters
dataa list of lists representing the tree structure of groups and its children
on_changethe operator to execute when the tree selection changes
Method __init__ Undocumented
Method to_json Undocumented

Inherited from View:

Method clone Undocumented
Method kwargs_to_json Undocumented
Instance Variable caption Undocumented
Instance Variable component Undocumented
Instance Variable componentsProps Undocumented
Instance Variable container Undocumented
Instance Variable description Undocumented
Instance Variable label Undocumented
Instance Variable placeholder Undocumented
Instance Variable read_only Undocumented
Instance Variable space Undocumented
Instance Variable _kwargs Undocumented
def __init__(self, **options): (source)
def to_json(self): (source)

Undocumented