react-virtualized icon indicating copy to clipboard operation
react-virtualized copied to clipboard

Whole list re-rendering when one item changes

Open jamesalester opened this issue 6 years ago • 3 comments

I'm using the InfiniteLoader to render potentially long lists of items. When an item is selected it loads up a new list next to it but keeps the original list in place with updated styling on the selected item. But it seems like this is causing the whole list to re-render:

mar-04-2019 15-31-09

Is this to do with the way rowRenderer is called?

This might be linked to issue #1028 where it looks like a property was added to prevent Grids from being re-rendered but it may not have been added to Lists.

jamesalester avatar Mar 04 '19 15:03 jamesalester

@jamesalester do you have a codesandbox for this? Try either passing isScrollingOptOut as a prop to <List> (beware of other side effects it could have) or try returning false in the componentShouldUpdate of your list item component.

jlil avatar Mar 23 '19 17:03 jlil

For future readers, this seems to have never been implemented for List, try using Grid directly

KevinKreps avatar Mar 10 '22 09:03 KevinKreps

It will be great to have this feature added to the List component, as well.

YaroslavAntipov357 avatar Apr 18 '22 16:04 YaroslavAntipov357