I am trying to implement virtualization with react-sortablejs for lists with more than 500 items.
I have tried with react-virtuoso, but react-sortablejs wraps the entire react-virtuoso component as a single item. Is there any way to target the li element inside of react-virtuoso itemContent?
<ReactSortable
tag="ul"
...sortableOptions
>
<Virtuoso
totalCount={500}
itemContent={(index)=> <li>Item {index} </li>}
/>
</ReactSortable>
It probably won't work because it requires
setList
and updates the list while moving mouse.Here is an alternative: https://virtuoso.dev/react-sortable-hoc/