projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* luci/core: cbi.lua: automatically set size of MultiValue fields
[project/luci.git]
/
libs
/
cbi
/
luasrc
/
cbi.lua
diff --git
a/libs/cbi/luasrc/cbi.lua
b/libs/cbi/luasrc/cbi.lua
index
ace35d9
..
42b58ce
100644
(file)
--- 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
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
Node.render(self, scope)
end
end