({
children,
initialRowHeights,
rowComponent = RowComponent
}: {
children?: ReactNode;
initialRowHeights?: number[];
rowComponent?: (props: RowComponentProps) => ReactElement | null;
})
| 49 | } |
| 50 | |
| 51 | function DynamicList({ |
| 52 | children, |
| 53 | initialRowHeights, |
| 54 | rowComponent = RowComponent |
| 55 | }: { |
| 56 | children?: ReactNode; |
| 57 | initialRowHeights?: number[]; |
| 58 | rowComponent?: (props: RowComponentProps) => ReactElement | null; |
| 59 | }) { |
| 60 | const rowHeight = useDynamicRowHeight({ |
| 61 | defaultRowHeight: 25, |
| 62 | initialRowHeights |
| 63 | }); |
| 64 | |
| 65 | return ( |
| 66 | <List |
| 67 | defaultHeight={100} |
| 68 | overscanCount={0} |
| 69 | rowComponent={rowComponent} |
| 70 | rowCount={100} |
| 71 | rowHeight={rowHeight} |
| 72 | rowProps={EMPTY_OBJECT} |
| 73 | > |
| 74 | {children} |
| 75 | </List> |
| 76 | ); |
| 77 | } |
| 78 | |
| 79 | // Resolves after requestAnimationFrame callbacks scheduled before this call, |
| 80 | // including callbacks they schedule (nested up to `count - 1` levels deep) |
nothing calls this directly
no test coverage detected