MCPcopy
hub / github.com/layui/layui / updateStatus

Function updateStatus

src/modules/treeTable.js:1542–1557  ·  view source on GitHub ↗
(data, statusObj, childrenKey, notCascade)

Source from the content-addressed store, hash-verified

1540 };
1541
1542 var updateStatus = function (data, statusObj, childrenKey, notCascade) {
1543 var dataUpdated = [];
1544 layui.each(data, function (i1, item1) {
1545 if (layui.type(statusObj) === 'function') {
1546 statusObj(item1);
1547 } else {
1548 $.extend(item1, statusObj);
1549 }
1550 dataUpdated.push($.extend({}, item1));
1551 notCascade ||
1552 (dataUpdated = dataUpdated.concat(
1553 updateStatus(item1[childrenKey], statusObj, childrenKey, notCascade)
1554 ));
1555 });
1556 return dataUpdated;
1557 };
1558
1559 Class.prototype.updateStatus = function (data, statusObj, notCascade) {
1560 var that = this;

Callers 2

updateOptionsFunction · 0.85
treeTable.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected