PluginTableSelect#
- class jdaviz.core.template_mixin.PluginTableSelect(**kwargs: Any)[source]#
Bases:
SelectPluginComponent
Plugin select for plugin table entries, with support for single or multi-selection.
Useful API methods/attributes:
selected
select_all()
(only ifis_multiselect
)select_none()
(only ifis_multiselect
)
Traitlets (in the object, custom traitlets in the plugin):
items
(list of dicts with keys: label)selected
(string)
Properties (in the object only):
selected_obj
Methods (in the object only):
get_object
To use in a plugin:
create traitlets with default values
register with all the automatic logic in the plugin’s init by passing the string names of the respective traitlets
use component in plugin template (see below)
refer to properties above based on the interally stored reference to the instantiated object of this component
Example template (label and hint are optional):
<plugin-select :items="table_items" :selected.sync="table_selected" label="Table" hint="Select table." />
- Parameters:
- plugin
the parent plugin object
- itemsstr
the name of the items traitlet defined in
plugin
- selectedstr
the name of the selected traitlet defined in
plugin
- multiselectstr
the name of the traitlet defining whether the dropdown should accept multiple selections
- filterslist
list of strings (for built-in filters) or callables to filter to only valid options.
- default_textstr or None
the text to show for no selection. If not provided or None, no entry will be provided in the dropdown for no selection.
- manual_options: list
list of options to provide that are not automatically populated by datasets. If
default
text is provided but not inmanual_options
it will still be included as the first item in the list.- default_modestr, optional
What mode to use when making the default selection. Valid options: first, default_text, empty.
Attributes Summary
Attributes Documentation
- selected_obj#