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

Function children

packages/react-aria-components/src/Collection.tsx:218–237  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

216 items: parent ? collection.getChildren!(parent.key) : collection,
217 dependencies: [renderDropIndicator],
218 children(node) {
219 // Return a empty fragment since we don't want to render the content twice
220 // If we don't skip the content node here, we end up rendering them twice in a Tree since we also render the content node in TreeItem
221 if (node.type === 'content') {
222 return <></>;
223 }
224
225 let rendered = node.render!(node);
226 if (!renderDropIndicator || node.type !== 'item') {
227 return rendered;
228 }
229
230 return (
231 <>
232 {renderDropIndicator({type: 'item', key: node.key, dropPosition: 'before'})}
233 {rendered}
234 {renderAfterDropIndicators(collection, node, renderDropIndicator)}
235 </>
236 );
237 }
238 });
239}
240

Callers 15

useCachedChildrenFunction · 0.85
ToastContainerFunction · 0.85
childNodesFunction · 0.85
Popover.tsxFile · 0.85
Tabs.tsxFile · 0.85
CalendarGridHeaderFunction · 0.85
CalendarGridBodyFunction · 0.85
DateField.tsxFile · 0.85
ComboBox.tsxFile · 0.85
Select.tsxFile · 0.85
useRenderPropsFunction · 0.85
SliderBase.tsxFile · 0.85

Calls 2

renderDropIndicatorFunction · 0.50

Tested by

no test coverage detected