MCPcopy Index your code
hub / github.com/layui/layui / updateCache

Function updateCache

src/modules/treeTable.js:115–124  ·  view source on GitHub ↗
(id, childrenKey, data)

Source from the content-addressed store, hash-verified

113 };
114
115 var updateCache = function (id, childrenKey, data) {
116 var tableCache = table.cache[id];
117 layui.each(data || tableCache, function (index, item) {
118 var itemDataIndex = item[LAY_DATA_INDEX] || '';
119 if (itemDataIndex.indexOf('-') !== -1) {
120 tableCache[itemDataIndex] = item;
121 }
122 item[childrenKey] && updateCache(id, childrenKey, item[childrenKey]);
123 });
124 };
125
126 var updateOptions = function (id, options, reload) {
127 var that = getThisTable(id);

Callers 2

updateOptionsFunction · 0.85
treeTable.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected