* luci/core: cbi.lua: automatically set size of MultiValue fields
This commit is contained in:
parent
6b0b22688c
commit
92d76ed836
1 changed files with 6 additions and 0 deletions
|
@ -579,6 +579,12 @@ function AbstractValue.render(self, s, scope)
|
||||||
if not self.optional or self:cfgvalue(s) or self:formcreated(s) then
|
if not self.optional or self:cfgvalue(s) or self:formcreated(s) then
|
||||||
scope = scope or {}
|
scope = scope or {}
|
||||||
scope.section = s
|
scope.section = s
|
||||||
|
|
||||||
|
-- fixup size for MultiValue fields
|
||||||
|
if instanceof(self, MultiValue) and self.widget == "select" and not self.size then
|
||||||
|
self.size = #self.vallist
|
||||||
|
end
|
||||||
|
|
||||||
Node.render(self, scope)
|
Node.render(self, scope)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue