MCPcopy Create free account
hub / github.com/adobe/react-spectrum / level

Method level

packages/react-aria/src/collections/Document.ts:283–289  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

281 }
282
283 get level(): number {
284 if (this.parentNode instanceof ElementNode) {
285 return this.parentNode.level + (this.parentNode.node?.type === 'item' ? 1 : 0);
286 }
287
288 return 0;
289 }
290
291 /**
292 * Lazily gets a mutable instance of a Node. If the node has already

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected