SelectPluginComponent#
- class jdaviz.core.template_mixin.SelectPluginComponent(**kwargs: Any)[source]#
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)remove_filter
(*filters)Select (and return) all available options.
Apply and return the default selection.
Select next entry in the choices, wrapping when reaching the end.
Select (and return) and empty list.
Apply and return the previous selection (or default option if no previous selection)
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
- select_all()[source]#
Select (and return) all available options. Raises an error if not
is_multiselect()
- select_next()[source]#
Select next entry in the choices, wrapping when reaching the end. Raises an error if
is_multiselect()
- select_none()[source]#
Select (and return) and empty list. Raises an error if not
is_multiselect()