React-virtualized: List does not re-render when the parent component rendering.

Created on 6 Jun 2018  路  3Comments  路  Source: bvaughn/react-virtualized

I think it's a bug but not very sure.

I have wrote some sample code in codepen: here.
(You can try to click any rows and check in the console, I have added some console.log there)

I use List component in my component. In rowRenderer of List, it uses state or props of my component, when the state or props changed, my component will be re-rendered, but List component does not.

My expectation is List will re-render and display by the new state or props.

Is it a bug or did I implement in a incorrect way, please?

Thank you very much for support.

question

Most helpful comment

Since the List is implemented using PureComponent unless the props to it explicitly change, it will not update. see this so I would recommend using forceUpdateGrid

All 3 comments

I used Table component implemented the simular feature, but it works as my expectation in Table.

Since the List is implemented using PureComponent unless the props to it explicitly change, it will not update. see this so I would recommend using forceUpdateGrid

Yeah, you are right, it works.
Thank you very much for your reply @wuweiweiwu .

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iChip picture iChip  路  3Comments

mccambridge picture mccambridge  路  3Comments

davidychow87 picture davidychow87  路  3Comments

pkumar84 picture pkumar84  路  4Comments

hyeminHwang picture hyeminHwang  路  3Comments