react-table-sorter

2.0.0 • Public • Published

A React.js Table Sorter Component

A sortable table component using Facebook's React. Build out as a reusable component from the demo made by bgerm.

View the demo repo.

View the running demo.

Features:

  • Remote data loading
  • Sortable columns
  • Filterable columns
  • Repeatable headers

Usage

Sortable Table takes two arguments, source and config. source is a string designating the path to a JSON formatted data source and config is a JavaScript object containing information about the structure of the table.

Example

var CONFIG = {
  sort: { column: "col2", order: "desc" },
  columns: {
    col1: { name: "Col1", filterText: "", defaultSortOrder: "desc"},
    col2: { name: "Col2", filterText: "", defaultSortOrder: "desc"},
    col3: { name: "Col3", filterText: "", defaultSortOrder: "desc"}
  }
};

React.renderComponent(<TableSorter dataSource="/api/data.json" config={CONFIG} headerRepeat="5" />, document.getElementById("table-sorter"));

Running the Demo

lute is a quick solution.

npm install -g lute
lute

And now view at: http://localhost:8080/example.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i react-table-sorter

Weekly Downloads

1

Version

2.0.0

License

MIT

Last publish

Collaborators

  • karana026
  • atangri
  • tom.mcnutt
  • ramandeepst
  • nehasharmast
  • jmorley-cvent
  • rmcvent
  • andrewmking
  • abenjamin
  • sramkumar2
  • ivaswanicasas
  • dmclaughlin
  • bporter42
  • ktst
  • bmontague-cvent
  • jcoutee
  • liz.thorne
  • robbe1912
  • st-awaas
  • jblackowiak
  • smiles.socialtables
  • alok2k5singh
  • sarahu-cv
  • jrnail23
  • socialtables-engineering
  • yi.chen
  • katherine.thompson
  • mattmcclure
  • socialtables-deployer
  • gvorvik
  • briankim4311
  • andrewcsontos
  • adamlind
  • nnarra
  • ashanevs
  • sarawegmann
  • ishak
  • johnbryant262
  • pinko-fowle
  • ldelarosa
  • pho3nixf1re
  • _evilnix_
  • sarthak.chatterjee
  • joshlartz
  • kgardi
  • otaghlabi
  • dwicks-socialtables
  • jonathandaigle
  • j.martin