1.0.1 • Published 4 years ago

react-virtualized-infinite-table v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

react-virtualized-infinite-table

A virtualized infinite scrolling table for react.

NPM JavaScript Style Guide

Install

npm install --save react-virtualized-infinite-table
yarn add react-virtualized-infinite-table --save

Example

example table

Props

Proptypedefaultrequireddescription
tableContainerClassNamestringundefinedAdd a class to the table wrapper div
tableClassNamestringundefinedAdd a class to the table
headerRowRendererfuncundefinedRendering the header
bodyRowRendererfuncundefinedRendering the bodyRow (item: any, index: number) => any
heightnumber500height of the table
stickyHeaderboolfalseMade the header sticky
itemsarrayundefinedAn array of items for the body rows
itemHeightnumber75height of the body rows
isLoadingboolfalseloading flag for fetching more
fetchMorefuncundefined() => any
itemsTotalLengthnumberundefinedtotal amount of items for the table
loadingComponentReact.FCLoadingAnimationA component to indicate if loading is active
nodePaddingnumber6amount of items before and after the visible window

Usage

import React, { Component } from 'react'

import { InfiniteTable } from 'react-virtualized-infinite-table'
import 'react-virtualized-infinite-table/dist/index.css'

class Example extends Component {
  render() {
    return (
      <InfiniteTable
         tableClassName={"table"}
         height={800}
         bodyRowRenderer={bodyRowRenderer}
         headerRowRenderer={headerRowRenderer}
         fetchMore={fetchMore}
         isLoading={isLoading}
         itemHeight={75}
         items={items}
         itemsTotalLength={itemsTotalLength}
         stickyHeader
      />
    )
  }
}

License

MIT © ZeroCool-85