X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=libs%2Fcbi%2Fluasrc%2Fcbi.lua;h=42b58ce0b4413d727027ff8b35d13a142236dad5;hp=ace35d951dc0473909f1e7dd4cba04dda86395fc;hb=92d76ed83603e50321f171996fc78cef0a6d3580;hpb=6b0b22688c27d290542f8b86d12183b5c4cd43fd diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index ace35d951..42b58ce0b 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