mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-23 07:21:22 +02:00
always rerender
as not all state that goes into rendering comes from state or props, we shouldn't be blocking rendering at all This might rerender a few times more, but it shouldn't be worse than what was there before the redesigned roomlist.
This commit is contained in:
parent
53ead43e2b
commit
107eb974d4
@ -73,12 +73,6 @@ export default class LazyRenderList extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
shouldComponentUpdate(nextProps, nextState) {
|
|
||||||
const itemsChanged = nextProps.items !== this.props.items;
|
|
||||||
const rangeChanged = nextState.renderRange !== this.state.renderRange;
|
|
||||||
return itemsChanged || rangeChanged;
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {itemHeight, items, renderItem} = this.props;
|
const {itemHeight, items, renderItem} = this.props;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user