npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-table-list-beta

v1.0.6

Published

test

Readme

List 列表元件開發

npm

  npm i react-router-dom react-table-list-beta

git

  https://github.com/1987showsun/list-table-component-by-React-dev

Demo

Ex columns json

typeSStyle : list

  [
    {
      "title"     : "鱼种",            //column名稱
      "columnKey" : "name",           //keyname
      "total"     : "",               //該欄為統計,如:輸入文字就直接顯示文字,可空直就將該欄位相加得到總合
      "link"      : true,             //開啟該欄位連結
      "path"      : "/xxxx/zzzz/aaaa",//欄位網址
      "sort"      : true              //排序開關 //status 0:一般排序 1:遞減 2:遞增
    },
    {...},
    {
      "title"     : "鱼种",            //column名稱
      "columnKey" : "fishMoney",      //keyname
      "total"     : "",               //該欄為統計,如:輸入文字就直接顯示文字,可空直就將該欄位相加得到總合
      "link"      : true,             //開啟該欄位連結
      "path"      : "/xxxx/zzzz/aaaa" //欄位網址
    }
  ]

typeSStyle : block (固定)

  [
    {
      "title"     : "Cover",          //column名稱
      "columnKey" : "cover",          //keyname
      "link"      : true,             //開啟該欄位連結
      "path"      : "/info/teams"     //欄位網址
    },
    {
      "title"     : "Content",         //column名稱
      "columnKey" : "",                //有 children keyname 該欄位
      "children"  : ["name","name_en"],//children keyname 非固定,自取名需對應 data keyname
      "link"      : true,              //開啟該欄位連結
      "path"      : "/info/teams"      //欄位網址
    }
  ]

Ex Data json

typeSStyle : list

  [
    {
      "id"             : "1",
      "name"           : "名稱1",
      "fishMoney"      : 1000
    },
    {...},
    {
      "id"             : "1",
      "name"           : "名稱1",
      "fishMoney"      : 1000
    }
  ]

typeSStyle : block (固定)

  [
    {
      "id"             : "1",
      "cover"          : "",
      "name"           : "名稱1",
      "name_en"        : "abcd"
    },
    {...},
    {
      "id"             : "1",
      "cover"          : "",
      "name"           : "名稱1",
      "name_en"        : "abcd"
    }
  ]

Ex instructions:


  import {BrowserRouter} from 'react-router-dom';
  import List            from 'react-table-list-beta';

  <BrowserRouter>
    ...
    <List 
        match             = { this.props.match }
        total             = { total }
        limit             = { limit }
        columns           = { thead['test'] }
        data              = { data }
        currentPage       = { this.props.match['params']['current'] }
        paginationStyle   = "model1"
        paginationPath    = { `/asd` }
        paginationSearch  = { `?testSearch=zzzz` }
        returnCurrentPage = { this.returnCurrentPage.bind(this) }
        returnSort        = { this.returnSortFreeFunctionName.bind(this) }
        fixedWidth        = { this.state.fixedWidth }
        fixed             = { ["thead","tfooter"] }
    />
    ...
  </BrowserRouter>

Api

| api | method | description | | ---------------- | --------------------------------------------------------- | ------------------------------------------- | | total | total={ totalNumber} | ajax response data length | | limit | limit={ limitNumber} | show data length | | columns | columns={ columnsObject } | columns json | | data | data={ response data } | response data json 需要與 columnsKey 取名一樣 | | currentPage | currentPage={ current Page Number } | current Page number | | paginationStyle | paginationStyle = {"model1"or"model2"} | pagination style | | paginationPath | paginationPath = { path link url string } | 頁碼連結 | | paginationSearch | paginationSearch = { loaction.search } | ex: ?aaaa=111111&bbbb=222222..... | | returnCurrentPage | returnCurrentPage={ this.returnCurrentPage.bind(this) } | returnCurrentPage Free name | | fixed | fixed={["thead","tfooter"]} | 可上下固定或其中一個固定 typeof:object status: 1.thead2.tfooter | | showLength | showLength={showLength number} | columns 一次可顯示比數 | | typeStyle | typeStyle= "block" / "list" | Display method Block or Column | | addClassName | addClassName= "XXXX" | Additional class name | | returnSort | returnSort={this.returnSortFreeFunctionName.bind(this)} | returnSortFreeFunctionName Name by yourself |

Demo Image

typeStyle : list

alt text