diff --git a/LibEditMode.lua b/LibEditMode.lua index 0959757..66a91c6 100644 --- a/LibEditMode.lua +++ b/LibEditMode.lua @@ -345,6 +345,7 @@ Depending on the setting type there are additional required and optional entries |:----------|:----------------------------------------------------------------------------------------------------------------------|:---------|:---------| | values | indexed table containing [DropdownOption](#dropdownoption)s | table | no | | generator | [Dropdown `SetupMenu` "generator" (callback)](https://warcraft.wiki.gg/wiki/Patch_11.0.0/API_changes#New_menu_system) | function | no | +| height | max height of the menu | integer | no | - Either `values` or `generator` is required, the former for simple menues and the latter for complex ones. - They are not exclusive, but `generator` takes precedence (e.g. `values` will be available but not used). diff --git a/widgets/dropdown.lua b/widgets/dropdown.lua index ff3de73..4a0d3b8 100644 --- a/widgets/dropdown.lua +++ b/widgets/dropdown.lua @@ -24,6 +24,10 @@ function dropdownMixin:Setup(data) end) elseif data.values then self.Dropdown:SetupMenu(function(_, rootDescription) + if data.height then + rootDescription:SetScrollMode(data.height) + end + for _, value in next, data.values do if value.isRadio then rootDescription:CreateRadio(value.text, get, set, {