-
Notifications
You must be signed in to change notification settings - Fork 0
ReorderList
ReorderList renders an ordered list with move/remove/format controls. The consumer owns the backing table and callbacks.
| Field | Type | Description |
|---|---|---|
getEntries |
function | Returns ordered entries. |
moveEntry |
function | Moves one entry. |
removeEntry |
function | Removes one entry. |
setEntryFormat |
function | Sets an entry format key. |
formatOptions |
table | Format key-to-label map. |
formatOrder |
table | Format display order. |
rowHeight |
number | Custom row height. |
emptyText |
string | Empty-list message. |
Entries can use fields such as:
{
id = "health",
label = "Health",
icon = "Interface\\Icons\\INV_Potion_54",
format = "icon",
}app:RegisterControl("bars.layout", {
id = "barOrder",
type = "reorderlist",
label = "Bar order",
rowHeight = 260,
getEntries = function()
return MyAddonDB.profile.barOrder or {}
end,
moveEntry = function(fromIndex, toIndex)
MyAddon.MoveBarOrderEntry(fromIndex, toIndex)
end,
removeEntry = function(index)
MyAddon.RemoveBarOrderEntry(index)
end,
setEntryFormat = function(index, formatKey)
MyAddon.SetBarOrderFormat(index, formatKey)
end,
formatOptions = { icon = "Icon", text = "Text" },
formatOrder = { "icon", "text" },
})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