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

Function CollectionBranch

packages/react-aria-components/src/Virtualizer.tsx:154–164  ·  view source on GitHub ↗
({parent, renderDropIndicator}: CollectionBranchProps)

Source from the content-addressed store, hash-verified

152}
153
154function CollectionBranch({parent, renderDropIndicator}: CollectionBranchProps) {
155 let virtualizer = useContext(VirtualizerContext);
156 let parentView = virtualizer!.virtualizer.getVisibleView(parent.key)!;
157 let {shouldObserveItemSize} = useContext(VirtualizerOptionsContext)!;
158 return renderChildren(
159 parentView,
160 Array.from(parentView.children),
161 renderDropIndicator,
162 shouldObserveItemSize
163 );
164}
165
166function renderChildren(
167 parent: View | null,

Callers

nothing calls this directly

Calls 2

getVisibleViewMethod · 0.80
renderChildrenFunction · 0.70

Tested by

no test coverage detected