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

Function last

packages/react-aria/src/grid/useGridCell.ts:419–429  ·  view source on GitHub ↗
(walker: TreeWalker)

Source from the content-addressed store, hash-verified

417}
418
419function last(walker: TreeWalker) {
420 let next: FocusableElement | null = null;
421 let last: FocusableElement | null = null;
422 do {
423 last = walker.lastChild() as FocusableElement | null;
424 if (last) {
425 next = last;
426 }
427 } while (last);
428 return next;
429}

Callers 2

focusFunction · 0.70
onKeyDownCaptureFunction · 0.70

Calls 1

lastChildMethod · 0.45

Tested by

no test coverage detected