((props, ref) => {
+ const outerProps = React.useContext(OuterElementContext);
+ return ;
+});
+
export const VirtualizedListbox = React.forwardRef<
HTMLDivElement,
{ children?: React.ReactNode }
>((props, ref) => {
- const itemData = React.Children.toArray(props.children);
+ const { children, ...other } = props;
+ const itemData = React.Children.toArray(children);
const itemCount = itemData.length;
const itemSize = 36;
const itemsToShow = Math.min(10, itemCount);
- const height = Math.max(itemSize, itemsToShow * itemSize - 0.5 * itemSize);
+ const height = itemsToShow * itemSize;
return (
-
- {renderRow}
-
+
+
+ {renderRow}
+
+
);
});