Added allowNil to properties

This commit is contained in:
Robert Jelic
2025-04-11 22:48:41 +02:00
parent 7c208d3ea6
commit 84f860a18a
2 changed files with 11 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ Container.defineProperty(Container, "childrenEvents", {default = {}, type = "tab
---@property eventListenerCount table {} The event listener count of the container
Container.defineProperty(Container, "eventListenerCount", {default = {}, type = "table"})
---@property focusedChild table nil The focused child of the container
Container.defineProperty(Container, "focusedChild", {default = nil, type = "table", setter = function(self, value, internal)
Container.defineProperty(Container, "focusedChild", {default = nil, type = "table", allowNil=true, setter = function(self, value, internal)
local oldChild = self._values.focusedChild
if value == oldChild then return value end