Skip to content

CheckSelect

Rodrigo E. Principe edited this page Mar 20, 2019 · 6 revisions

CheckSelect(options)

A simple widget with a ui.Checkbox in one side and a ui.Select in the other

Options:

  • items: items for the Select
  • checkbox: parameters for the Checkbox
  • select: parameters for the Select (except items)
  • panel: parameters for the Panel that contains both widgets

Methods:

  • addTo(widget): adds the panel to the parsed widget
  • insertTo(widget, position): inserts the panel to the parsed widget in the parsed position
  • getLabel(): gets the selected label. To get the selected value use: CheckSelect.select.getValue()
  • close(): closes the panel
  • onSelect(callback): registers a callback that's fired when the Select widget changes. The arguments for the callback are: (select_value, check_value, select_widget, checkbox_widget, CheckSelect_widget)
  • onCheck(callback): registers a callback that's fired when the Checkbox widget changes. The arguments for the callback are: (check_value, select_value, checkbox_widget, select_widget, CheckSelect_widget)

example: https://code.earthengine.google.com/9918712ffcbea59a9d250c3aaa108e00

Clone this wiki locally