-
Notifications
You must be signed in to change notification settings - Fork 0
MultiDropdown
A MultiDropdown stores multiple selected values. The expected storage shape is a
boolean map where selected keys are true.

| Field | Type | Description |
|---|---|---|
options / list
|
table | Value-to-label map. |
orderList / order
|
table | Display order. |
getSelection |
function | Returns a boolean map. |
setSelection |
function | Writes a boolean map. |
isSelectedFunc |
function | Per-option selected reader. |
setSelectedFunc |
function | Per-option selected writer. |
menuHeight |
number | Menu height. |
hideSummary is currently metadata/pass-through only and is not consumed by the
UI renderer.
app:RegisterControl("group.roles", {
id = "roles",
type = "multidropdown",
label = "Roles",
options = { tank = "Tank", healer = "Healer", damage = "Damage" },
orderList = { "tank", "healer", "damage" },
getSelection = function()
return MyAddonDB.profile.roles or {}
end,
setSelection = function(selection)
MyAddonDB.profile.roles = selection or {}
MyAddon.RefreshRoles()
end,
default = {},
})isSelectedFunc = function(value)
local roles = MyAddonDB.profile.roles
return roles and roles[value] == true
end
setSelectedFunc = function(value, selected)
MyAddonDB.profile.roles = MyAddonDB.profile.roles or {}
MyAddonDB.profile.roles[value] = selected and true or nil
MyAddon.RefreshRoles()
end- Do not rebuild the settings frame from
setSelectedFunc. - Deselect by removing keys or assigning
nil. - Use
menuHeightfor large option sets.
Wiki
• Home
• Architecture
• Vendoring
• Quick Start
• Field Glossary
• Troubleshooting
• Validation
Reference
⚬ Config API
⚬ UI API
⚬ Elements
⚬ Examples
Elements
Structure
• Category
• Page
• Group
• Dashboard
• InfoPage
• Custom
Controls
• Toggle
• CheckboxDropdown
• Dropdown
• MultiDropdown
• SoundDropdown
• Input
• Slider
• Button
Advanced
• ColorPicker
• ColorPalette
• ColorOverrides
• ReorderList
• Expandable
• Notes
Examples
Start
• Minimal Addon
• Complete Settings Center
• Wrapper Bridge Pattern
Data and Behavior
• Dependent Controls
• Nested Database Values
• Dynamic Dropdowns
• Runtime Refresh
• Search and New Badges
• Custom Hosted Editors
Polish
• Support Links
• Theme Colors
• Theme Borders