summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static/resources/ui.js
diff options
context:
space:
mode:
authorJames Haggerty <james.haggerty@morsemicro.com>2023-06-08 11:59:39 +1000
committerPaul Donald <newtwen@gmail.com>2024-03-17 00:23:45 +0100
commit97ebdcbddb9cad76dc551086fcb887e55886a069 (patch)
tree3f7f0786f1a34958d0421c7df7c3ee15c8c4d1df /modules/luci-base/htdocs/luci-static/resources/ui.js
parent6abb5ed7095032fdf8d2c9e2cac3218db99b19e5 (diff)
luci-base: force menu to regenerate after uci change
Because the menu JSON can have 'depends' in them, uci changes should force the menu to regenerate. Closes #6423 Signed-off-by: James Haggerty <james.haggerty@morsemicro.com> Signed-off-by: Paul Donald <newtwen@gmail.com>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources/ui.js')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/ui.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js
index afb590d8f8..b17fdc45fe 100644
--- a/modules/luci-base/htdocs/luci-static/resources/ui.js
+++ b/modules/luci-base/htdocs/luci-static/resources/ui.js
@@ -3478,6 +3478,10 @@ var UITable = baseclass.extend(/** @lends LuCI.ui.table.prototype */ {
}
});
+// Because the menu can depend on uci values, we need to flush the cache
+// after uci mutations.
+document.addEventListener('uci-applied', () => UIMenu.flushCache());
+
/**
* @class ui
* @memberof LuCI