Skip to content

Dropdown ui-dropdown

Try Demo

Adds a dropdown to your dashboard that will emit values in Node-RED under msg.payload anytime it's value is changed.

Programmatic Selections

You can dynamically make selections for this dropdown by passing in the respective value to msg.payload.

Single Selection

To make a single selection, pass in the value of the option as msg.payload, e.g. msg.payload = "option1".

Multi-Selection

To make a multi-selection selection, you must first have "Allow Multiple" enabled on the node, you can then pass an Array of value of the respective options as msg.payload, e.g. msg.payload = ["option1", "option2"].

Clear Selection

To clear any selection for a dropdown, pass an empty array [] as msg.payload.

Properties

PropDynamicDescription
GroupDefines which group of the UI Dashboard this widget will render in.
SizeControls the width of the dropdown with respect to the parent group. Maximum value is the width of the group.
LabelThe text shown to the left of the dropdown. Html content is allowed.
OptionsA list of the options available in the dropdown. Each row defines a 'label' (shown in the dropdown) and `value` (emitted on selection) property.
Allow MultipleWhether or not a user can select multiple options, if so, checkboxes are shown, and value is emitted in an array.
ChipsShow selected elements in chips.
ClearableClear selection with button.
Allow SearchAllows user to type a new value, filtering the list of possible values to choose.

Dynamic Properties

Dynamic properties are those that can be overriden at runtime by sending a particular msg to the node.

Where appropriate, the underlying values set within Node-RED will be overriden by the values set in the received messages.

PropPayloadStructuresExample Values
Labelmsg.ui_update.labelString
Optionsmsg.ui_update.options
  • Array<String>
  • Array<{value: String}>
  • Array<{value: String, label: String}>
Allow Multiplemsg.ui_update.multipleBoolean
Classmsg.ui_update.classString

Example

Example of a dropdownExample of a rendered dropdown in a Dashboard.

Example of a multiple selection dropdownDropdowm with multiple selection, chips and clear button.