DatasetSelectMixin

class jdaviz.core.template_mixin.DatasetSelectMixin(**kwargs)[source] [edit on github]

Bases: ipyvuetify.VuetifyTemplate.VuetifyTemplate, glue.core.hub.HubListener

Applies the DatasetSelect component as a mixin in the base plugin. This automatically adds traitlets as well as new properties to the plugin with minimal extra code. For multiple instances or custom traitlet names/defaults, use the DatasetSelect component instead.

Traitlets (available from the plugin):

  • dataset_items

  • dataset_selected

Properties (available from the plugin):

  • dataset.selected_obj

  • dataset.selected_dc_item

Methods (available from the plugin):

  • dataset.get_object

  • dataset.add_filter (preferably used during plugin init)

To use in a plugin:

  • add DatasetSelectMixin as a mixin to the class

  • use the traitlets and properties above as needed (note the prefix for properties)

Example template (label and hint are optional):

<v-row>
  <plugin-dataset-select
    :items="dataset_items"
    :selected.sync="dataset_selected"
    label="Data"
    hint="Select data."
  />
</v-row>

Public constructor

Attributes Summary

dataset_items

An instance of a Python list.

dataset_selected

A trait for unicode strings.

Attributes Documentation

dataset_items

An instance of a Python list.

dataset_selected

A trait for unicode strings.