in src/list/list.tsx [224:244]
componentDidUpdate(prevProps: ListProps<T>) {
if (this.virtualizedList && prevProps.data !== this.props.data) {
this.virtualizedList.recomputeRowHeights();
}
const {activeIndex} = this.state;
const isActiveItemRetainedPosition = activeIndex
? prevProps.data[activeIndex]?.key === this.props.data[activeIndex]?.key
: false;
if (
(this.props.activeIndex === null || this.props.activeIndex === undefined) &&
getDataHash(this.props.data) !== getDataHash(prevProps.data) &&
shouldActivateFirstItem(this.props) &&
!isActiveItemRetainedPosition
) {
this.activateFirst();
}
this.checkOverflow();
}