Dropdown Fix

Progressbar Fix
List 2 new Methods: scrollToBottom scrollToTop
Readme Update
Generate-config size addition
This commit is contained in:
Robert Jelic
2025-02-22 11:26:20 +01:00
parent e6bc79ff5e
commit 3d7c7aa02a
6 changed files with 186 additions and 52 deletions

View File

@@ -167,6 +167,23 @@ function List:onSelect(callback)
return self
end
--- Scrolls the list to the bottom
--- @shortDescription Scrolls the list to the bottom
--- @return List self The List instance
function List:scrollToBottom()
local maxOffset = math.max(0, #self.get("items") - self.get("height"))
self.set("offset", maxOffset)
return self
end
--- Scrolls the list to the top
--- @shortDescription Scrolls the list to the top
--- @return List self The List instance
function List:scrollToTop()
self.set("offset", 0)
return self
end
--- Renders the list
--- @shortDescription Renders the list
function List:render()