LUCI behaviour
Paul D
newtwen at gmail.com
Thu Oct 21 11:02:09 PDT 2021
If I use js e.g. :
o = ss.option(form.TextValue, 'blah', _('blah'), _('blah.'));
o.optional = true;
o.monospace = true;
And add either:
o.width = "500px";
or:
o.width = "60ch";
I do not get the desired effect. Is this normal?
Here ( https://openwrt.github.io/luci/jsapi/LuCI.form.TextValue.html )
it says about width:
======
When the property is set to a string value, it is applied as-is to the
CSS width property.
This property has no effect on options that are not children of grid or
table section elements.
======
How does one know that it's a child of said element? ( Is it talking
about HTML elements? Or LUCI? Also, which 'options'? )
If it is, is this a bug? The width always seems to be "100%".
HTML produced never has px or ch width. As soon as I set 'o.cols' then
the element aligns with other form elements. e.g. ~210px width.
So damned if I do, damned if I don't. How can one constrain width?
More information about the openwrt-devel
mailing list