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

Function collectAllCheckedNodes

web/pgadmin/static/js/PgTreeView/index.jsx:124–137  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

122 // We use wrapper objects to avoid mutating the original node data.
123 const allCheckedNodes = [];
124 const collectAllCheckedNodes = (n) => {
125 if (!n) return;
126 const state = newState[n.id];
127 if (state === true || state === 'indeterminate') {
128 // Pass wrapper object with isIndeterminate flag to differentiate
129 // full schema selection from partial selection in backup dialog
130 allCheckedNodes.push({
131 node: n,
132 isIndeterminate: state === 'indeterminate'
133 });
134 }
135 // Recursively check all children
136 n.children?.forEach(child => { collectAllCheckedNodes(child); });
137 };
138
139 // Navigate up to find the root level of the tree (parent of root nodes is '__root__')
140 let rootNode = node;

Callers 1

toggleCheckFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected