Skip to content

A react component for displaying tabular data in FlyBase reports.

License

Notifications You must be signed in to change notification settings

FlyBase/react-flybase-datagrid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

200 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Flybase Datagrid

Travis npm package Coveralls

React Data table component using Fixed-Data-Table for Flybase.org which has sort/filter/export capabilities.

Clone the git repo.

git clone https://github.com/FlyBase/react-flybase-datagrid.git
cd react-flybase-datagrid 
git checkout master
npm install
npm run start

Example

import React from 'react'
import FlybaseDataGrid from 'react-flybase-datagrid'

class Application extends React.Component {
   render() {

    const columns = [
      {
        id: 'id',
        name: 'ID'
      }, 
      {
        id: 'name',
        name: 'Name',
      }, 
      {
        id: 'address',
        name: 'Street Address'
      }, 
      {
        id: 'state',
        name: 'State'
      }, 
      {
        id: 'zip',
        name: 'Code, Zip'
      }
    ];

    const items = [{id: '1', name: 'Hoosier', address: '107 S Indiana Ave', state: 'IN', zip: '47405'}];

    return (
      <div>
        <FlybaseDataGrid  
        columns={columns} 
        data={items}
        showColumnFilter
        downloadButton={['tsv']}
        maxHeight={1000}
        width={1110} />
      </div>
    );      
  }
};

Installation

npm:

npm install --save react-flybase-datagrid

About

A react component for displaying tabular data in FlyBase reports.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •