summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--libs/cbi/luasrc/cbi.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua
index ace35d951d..42b58ce0b4 100644
--- a/libs/cbi/luasrc/cbi.lua
+++ b/libs/cbi/luasrc/cbi.lua
@@ -579,6 +579,12 @@ function AbstractValue.render(self, s, scope)
if not self.optional or self:cfgvalue(s) or self:formcreated(s) then
scope = scope or {}
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)
end
end