Skip to main content

dropdown

Add dropdown selection menus for choosing from predefined options.

Overview

The dropdown node adds selection menus to your dashboard. Users choose from predefined options, perfect for mode selection, device targeting, or any scenario requiring selection from a list.

Select
Menu
Multi
Select
Dynamic
Options
Search
Filter

Properties

Property Type Default Description
group string - Dashboard group
label string "Select" Label text
options array [] List of options
multiple boolean false Allow multiple selections
placeholder string "Select..." Placeholder text

Options Format

Simple Array

["Option 1", "Option 2", "Option 3"]

// Value = Label

Object Array

[
  { "label": "Auto", "value": "auto" },
  { "label": "Manual", "value": "manual" },
  { "label": "Off", "value": "off" }
]

Example: Operating Mode Selection

Select device operating mode from dropdown.

// Dropdown node configuration:
{
  "label": "Operating Mode",
  "options": [
    { "label": "Automatic", "value": "auto" },
    { "label": "Manual", "value": "manual" },
    { "label": "Eco Mode", "value": "eco" },
    { "label": "Boost", "value": "boost" }
  ],
  "topic": "device/mode"
}

// User selects "Eco Mode"
// Output: { payload: "eco", topic: "device/mode" }

Example: Dynamic Options from Database

Populate dropdown with options from a database query.

// Query database for devices
// SELECT id, name FROM devices WHERE status = 'active'

// Function node: Format as dropdown options
msg.options = msg.payload.map(function(device) {
    return {
        label: device.name,
        value: device.id
    };
});

return msg;

// Output to dropdown updates options dynamically
// msg.options = [
//   { label: "Living Room Sensor", value: "device_001" },
//   { label: "Kitchen Sensor", value: "device_002" }
// ]

Multi-Select Example

// Dropdown node with multiple: true
{
  "label": "Select Sensors",
  "multiple": true,
  "options": [
    { "label": "Temperature", "value": "temp" },
    { "label": "Humidity", "value": "humidity" },
    { "label": "Pressure", "value": "pressure" },
    { "label": "Light", "value": "light" }
  ]
}

// User selects Temperature and Humidity
// Output: { payload: ["temp", "humidity"] }

Related Nodes