MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / updateDescendants

Function updateDescendants

web/pgadmin/static/js/PgTreeView/index.jsx:89–92  ·  view source on GitHub ↗
(n, val)

Source from the content-addressed store, hash-verified

87
88 // Update the clicked node and all its descendants with the new checked value
89 const updateDescendants = (n, val) => {
90 newState[n.id] = val;
91 n.children?.forEach(child => { updateDescendants(child, val); });
92 };
93 updateDescendants(node, isChecked);
94
95 // Update ancestor nodes to reflect the correct state (checked/unchecked/indeterminate)

Callers 1

toggleCheckFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected