luci-base: fix table option does not show in non-Bootstrap themes when it has depends
authorJoseph Mory <[email protected]>
Fri, 30 May 2025 12:32:47 +0000 (20:32 +0800)
committerPaul Donald <[email protected]>
Tue, 2 Sep 2025 13:20:24 +0000 (15:20 +0200)
Signed-off-by: Joseph Mory <[email protected]>
(cherry picked from commit 55c93e60b4e598e81eeb1774d5d83ac32b245016)

modules/luci-base/htdocs/luci-static/resources/form.js

index e5e84ec92d98faa11ab56470d443958394e3aff8..2f227bdc471b21464b88895451d095d45bac7ea9 100644 (file)
@@ -3779,7 +3779,10 @@ const CBIValue = CBIAbstractValue.extend(/** @lends LuCI.form.Value.prototype */
                                E('div', { 'class': 'cbi-value-description' }, this.description.trim()));
 
                if (depend_list && depend_list.length)
-                       optionEl.classList.add('hidden');
+                       if (in_table)
+                               optionEl.firstChild.classList.add('hidden');
+                       else
+                               optionEl.classList.add('hidden');
 
                optionEl.addEventListener('widget-change',
                        L.bind(this.map.checkDepends, this.map));