Closed nassif7 closed 2 years ago
Hello There, I just started using this very nice library. thank you!
I have a problem when using the components prop, when I am adding my List and Item, the list only render the first Item.
here is my components
import React from 'react' import { Components } from 'react-virtuoso' export const List: Components['List'] = React.forwardRef((props, ref) => { return <div className='list-group' {...props} ref={ref} /> }) export const Item: Components['Item'] = ({ children }) => { return <div className='list-group-item list-group-item-action'>{children}</div> }
and here how i am using the Virtuoso component
<> <Virtuoso style={{ height: '100%' }} data={items} itemContent={(index, item) => { return <>{item.label}</> }} components={{ List, Item }} /> </>
any help would be greatly appreciated
ok it seems I was missing the props on the Item component.
closed
Hello There, I just started using this very nice library. thank you!
I have a problem when using the components prop, when I am adding my List and Item, the list only render the first Item.
here is my components
and here how i am using the Virtuoso component
any help would be greatly appreciated