Virtualize Messages List - only render what's visible

This commit is contained in:
Scott Nonnenberg 2019-05-31 15:42:01 -07:00
parent a976cfe6b6
commit 5ebd8bc690
73 changed files with 4717 additions and 2745 deletions

View file

@ -14,6 +14,10 @@ import { SmartMainHeader } from './MainHeader';
// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/31363
const FilteredSmartMainHeader = SmartMainHeader as any;
function renderMainHeader(): JSX.Element {
return <FilteredSmartMainHeader />;
}
const mapStateToProps = (state: StateType) => {
const showSearch = isSearching(state);
@ -25,7 +29,7 @@ const mapStateToProps = (state: StateType) => {
searchResults,
showArchived: getShowArchived(state),
i18n: getIntl(state),
renderMainHeader: () => <FilteredSmartMainHeader />,
renderMainHeader,
};
};