Select#
Select #
Select(
data: DataType | DataFrame,
*,
id_column: TemplatedStringItem = "id",
default_selection: str | None = None,
label_column: TemplatedStringItem | None = None,
widget_id: str | None = None,
label: TemplatedStringItem = "",
label_outside: bool = True,
group_column: TemplatedStringItem | None = None,
show_group_when_selected: bool = False,
)
Construct select widget.
Construct a select widget for choosing from a list of options, with options to customize the data source, ID column, default selection, label column, widget ID, label text, grouping, and label display options.
Constructor for Select widget.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
DataType | DataFrame
|
data to be used by widget. Accepts storages as well as raw data. |
required |
widget_id
|
str | None
|
unique widget id in a dashboard. |
None
|
id_column
|
TemplatedStringItem
|
name of column in pandas dataframe(s) used for the id associated with each entry. |
'id'
|
label_column
|
TemplatedStringItem | None
|
name of column in pandas dataframe(s) used for the value displayed for each entry. |
None
|
default_selection
|
str | None
|
id of entry that is selected by default. |
None
|
label
|
TemplatedStringItem
|
label shown before select options. |
''
|
label_outside
|
bool
|
flag that inserts the |
True
|
group_column
|
TemplatedStringItem | None
|
name of column in pandas dataframe(s) used to define the entries groups. |
None
|
show_group_when_selected
|
bool
|
flag will append the group name into entry label. |
False
|