UNPKG

react-recycled-list

Version:

A React library for efficiently rendering large list with expensive component

40 lines (39 loc) 1.41 kB
import React from 'react'; import { RowToDataIndexMap } from './utils'; import { ReactRecycledListProps, ReactRecycledListState } from './TypeDef'; import GeneralList from './AbstractList'; interface FixedListProps extends ReactRecycledListProps { /** * The height of the list. */ height: number; } export default class FixedList extends GeneralList<FixedListProps, ReactRecycledListState> { rowPositions: number[]; rowHeights: number[]; rowToDataIndexMap: RowToDataIndexMap; fullHeight: number; windowHeight: number; initialArrayTemplate: null[]; totalNumOfRenderedRows: number; numOfInvisibleRowOnEachDirection: number; totalRows: number; timeOut: any; listWindowRef: React.RefObject<HTMLDivElement>; initializeProperties: () => { rowToDataIndexMap: RowToDataIndexMap; rowPositions: number[]; totalRows: number; initialArrayTemplate: any[]; fullHeight: number; totalNumOfRenderedRows: number; numOfInvisibleRowOnEachDirection: number; rowHeights: number[]; windowHeight: number; }; constructor(props: FixedListProps); shouldResetList: (prevProps: FixedListProps) => boolean; getTopViewportRowIndex: (scrollTop: number) => number; getBottomViewportRowIndex: (viewportBottom: number) => number; } export {};