MCPcopy Index your code
hub / github.com/adobe/react-spectrum / last

Function last

packages/react-aria/src/gridlist/useGridListItem.ts:468–478  ·  view source on GitHub ↗
(walker: TreeWalker)

Source from the content-addressed store, hash-verified

466}
467
468function last(walker: TreeWalker) {
469 let next: FocusableElement | null = null;
470 let last: FocusableElement | null = null;
471 do {
472 last = walker.lastChild() as FocusableElement | null;
473 if (last) {
474 next = last;
475 }
476 } while (last);
477 return next;
478}
479
480function getDirectChildren<T>(parent: RSNode<T>, collection: Collection<RSNode<T>>) {
481 // We can't assume that we can use firstChildKey because if a person builds a tree using hooks, they would not have access to that property (using type Node vs CollectionNode)

Callers 1

onKeyDownCaptureFunction · 0.70

Calls 1

lastChildMethod · 0.45

Tested by

no test coverage detected