MCPcopy Create free account
hub / github.com/UI5/webcomponents / _prepareTreeItems

Method _prepareTreeItems

packages/main/src/Tree.ts:453–464  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

451 }
452
453 _prepareTreeItems() {
454 // set level to tree items
455 this.walk((item, level, index) => {
456 const parent = item.parentNode;
457 const ariaSetSize = (parent && parent.children.length) || this.items.length;
458
459 item.setAttribute("level", level.toString());
460
461 item.forcedSetsize = ariaSetSize;
462 item.forcedPosinset = index + 1;
463 });
464 }
465
466 /**
467 * Returns the corresponding list item for a given tree item

Callers 1

onBeforeRenderingMethod · 0.95

Calls 2

walkMethod · 0.95
toStringMethod · 0.45

Tested by

no test coverage detected