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

Method constructor

web/pgadmin/static/js/tree/tree_nodes.ts:232–241  ·  view source on GitHub ↗
(id, data, domNode, parent, metadata, type)

Source from the content-addressed store, hash-verified

230
231export class TreeNode {
232 constructor(id, data, domNode, parent, metadata, type) {
233 this.id = id;
234 this.data = data;
235 this.setParent(parent);
236 this.children = [];
237 this.domNode = domNode;
238 this.metadata = metadata;
239 this.name = metadata ? metadata.data.label : '';
240 this.type = type || undefined;
241 }
242
243 hasParent() {
244 return this.parentNode !== null && this.parentNode !== undefined;

Callers

nothing calls this directly

Calls 1

setParentMethod · 0.95

Tested by

no test coverage detected