diff --git a/packages/virtualized-lists/Lists/VirtualizedList.js b/packages/virtualized-lists/Lists/VirtualizedList.js index 031267465af8..9d207739a3df 100644 --- a/packages/virtualized-lists/Lists/VirtualizedList.js +++ b/packages/virtualized-lists/Lists/VirtualizedList.js @@ -1152,13 +1152,6 @@ class VirtualizedList extends StateSafePureComponent< } return cloneElement(element, { - onLayout: (event: LayoutChangeEvent) => { - this._onLayoutEmpty(event); - // $FlowFixMe[prop-missing] React.Element internal inspection - if (element.props.onLayout) { - element.props.onLayout(event); - } - }, // $FlowFixMe[prop-missing] React.Element internal inspection style: StyleSheet.compose(inversionStyle, element.props.style), }); @@ -1695,10 +1688,6 @@ class VirtualizedList extends StateSafePureComponent< this._maybeCallOnEdgeReached(); }; - _onLayoutEmpty = (e: LayoutChangeEvent) => { - this.props.onLayout && this.props.onLayout(e); - }; - _getFooterCellKey(): string { return this._getCellKey() + '-footer'; } diff --git a/packages/virtualized-lists/Lists/__tests__/VirtualizedList-test.js b/packages/virtualized-lists/Lists/__tests__/VirtualizedList-test.js index 5bc0254c7127..0b39177a1e62 100644 --- a/packages/virtualized-lists/Lists/__tests__/VirtualizedList-test.js +++ b/packages/virtualized-lists/Lists/__tests__/VirtualizedList-test.js @@ -373,7 +373,7 @@ describe('VirtualizedList', () => { expect(result).toBe(fragment); }); - it('empty component clones the element and adds onLayout and style props if not a Fragment', () => { + it('empty component clones the element and adds the style prop if not a Fragment', () => { const listRef = createRef(); const element =