SelectPluginComponent
- class jdaviz.core.template_mixin.SelectPluginComponent(**kwargs: Any)[source] [edit on github]
Bases:
BasePluginComponent
,HasTraits
Plugin select, with support for single or multi-selection.
Useful API methods/attributes:
selected
select_all()
(only ifis_multiselect
)select_none()
(only ifis_multiselect
)
This extends BasePluginComponent for common functionality for a select/dropdown component. The subclasses MUST have an
items
traitlet as a list of dictionaries, with ‘label’ as the selection entry (and any other optional entries for styling, etc) and aselected
string traitlet. The subclasses should also overrideselected_obj
and may choose to override_selected_changed
(likely with a super call to keep the base logic).Attributes Summary
An instance of a Python list.
Methods Summary
add_filter
(*filters)Select (and return) all available options.
Apply and return the default selection.
Select (and return) and empty list.
Attributes Documentation
- cached_properties
- choices
- default_mode
- default_text
- filters
An instance of a Python list.
- is_multiselect
- labels
- manual_options
- selected_item
- selected_obj
- viewer_dicts
- viewer_ids
- viewer_refs
- viewers
Methods Documentation
- add_filter(*filters)[source] [edit on github]
- select_all()[source] [edit on github]
Select (and return) all available options. Raises an error if not
is_multiselect()
- select_default()[source] [edit on github]
Apply and return the default selection.
- select_none()[source] [edit on github]
Select (and return) and empty list. Raises an error if not
is_multiselect()