DatasetSelect
- class jdaviz.core.template_mixin.DatasetSelect(**kwargs: Any)[source] [edit on github]
Bases:
BaseSelectPluginComponent
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
selected_dc_item
Methods (in the object only):
get_object
add_filter
(more useful for the mixin, when creating a custom component, passfilters
)
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-dataset-select :items="dataset_items" :selected.sync="dataset_selected" label="Data" hint="Select data." />
- 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
- 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 subsets. If
default
text is provided but not inmanual_options
it will still be included as the first item in the list.
Attributes Summary
Methods Summary
get_object
(*args, **kwargs)Attributes Documentation
- default_data_cls
- selected_dc_item
- selected_obj
Methods Documentation
- get_object(*args, **kwargs)[source] [edit on github]