I have a react-virtualized list (using List component) like this:
renderItem = ({ index, key, style }) => {
const {
entries,
projectId,
} = this.props;
const entry = entries[index];
return (
<div key={key} style={style}>
<MyItem
entry={entry}
entryIndex={index}
projectId={projectId}
/>
</div>
);
}
<List
rowHeight={75}
rowRenderer={this.renderItem}
rowCount={entries.length}
width={780}
height={1000}
/>
MyItem
is connected to a redux store and can be interacted with. However it's not reflecting any of the changes on the screen until I scroll the list, as soon as I scroll I see the list item as it should be with the updates since MyItem's
render()
is finally called.
How can I get react-virtualized to re-render the list item when a prop changes?