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

Method ancestorNode

web/pgadmin/static/js/tree/tree_nodes.ts:278–289  ·  view source on GitHub ↗
(condition)

Source from the content-addressed store, hash-verified

276 * Find the ancestor with matches this condition
277 */
278 ancestorNode(condition) {
279 let node = this;
280
281 while (node.hasParent()) {
282 node = node.parent();
283 if (condition(node)) {
284 return node;
285 }
286 }
287
288 return null;
289 }
290
291 /**
292 * Given a condition returns true if the current node

Callers 4

anyFamilyMemberMethod · 0.95
anyParentMethod · 0.95

Calls 2

hasParentMethod · 0.65
parentMethod · 0.65

Tested by

no test coverage detected