react fluid table
1.2.2
一個受 @tanstack/react-virtual啟發的反應表
# using yarn
yarn add react-fluid-table
# using npm
npm i react-fluid-table import "react-fluid-table/dist/index.css" ; // this only needs to be imported once
import { Table } from "react-fluid-table" ;
const data = _ . range ( 100 ) . map ( i => ( {
id : i + 1 ,
firstName : randFirstName ( ) ,
lastName : randLastName ( ) ,
email : randEmail ( )
} ) ) ;
const columns = [
{
key : "firstName" ,
header : "First Name" ,
width : 100
} ,
{
key : "lastName" ,
header : "Last Name" ,
width : 100
} ,
{
key : "email" ,
header : "Email"
}
] ;
const Example = ( ) => < Table data = { data } columns = { columns } /> ; 要使開發環境正常運行,請運行以下內容:
安裝
$ yarn install
$ cd example
$ yarn install用法
# in one terminal window/tab
$ yarn start
# in a separate terminal window/tab
$ cd example
$ yarn devMIT©McKervin Ceme <[email protected]>
此應用程序是使用Create-React-Hook創建的。
該應用程序具有來自字體的一些圖標。