gluon-web-model: resolve hang when submitting form with disabled element

I was made aware of a bug when submitting the form while the element is
disabled based on it's dependencies

The fix was to inherit from AbstractValue instead of just node

AbstractValue's AbstractValue:resolve_node_depends() in particular
solves the issue, but it made more sense to just use the full base class
This commit is contained in:
Maciej Krüger 2022-12-13 00:14:13 +01:00
parent 535cc3f468
commit a0db0a46b3
No known key found for this signature in database
GPG Key ID: 0D948CE19CF49C5F

View File

@ -410,11 +410,11 @@ function TextValue:__init__(...)
end
local Element = class(Node)
local Element = class(AbstractValue)
M.Element = Element
function Element:__init__(template, kv, ...)
Node.__init__(self, ...)
AbstractValue.__init__(self, ...)
self.default = nil
self.size = nil