1.3.9 • Published 10 years ago

react-touchable-tabular v1.3.9

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

React Touchable Tabular

NPM version Build status Dependency Status Downloads

A React Component to used to view tabular data based on facebook/fixed-data-table.

Installation

$ npm install react-touchable-tabular --save

Requirement

Before using this module, please make sure you have installed manually the following modules:

  • react
  • react-dom
  • momentjs namely moment from NPM

Note: The above 3 modules is peer dependencies, as well as the webpack externals to reduce the generated bundle size.

Usage

import React from 'react';
import Tabular from 'react-touchable-tabular';

class ExampleApp extends React.Component {
  async getDataSource() {
    return await getList();
  }
  render() {
    return (
      <Tabular getDataSource={this.getDataSource}
        tableHeight={1000}
        tableWidth={800}
        columns={[
          {
            title: 'first name',
            key: 'name.first'
          },
          {
            title: 'last name',
            key: 'name.last'
          },
          {
            title: 'created',
            key: 'created',
            type: 'date'
          }
        ]}
      />
    );
  }
}

Why not fixed-data-table directly?

We build the following features based on fixed-data-table:

  • provides touchable to view your data on iPad, Android Pad devices
  • provides sortable column by default and supports dot namespace for sorting key
  • provides an array property columns to render your column data with less code
  • provides a property type
    • if type is "date", this component will format the date by using momentjs
    • if type is "bool", this component will format the value to Yes or No
  • with auto computation on the width values of every columns based on the total width.

License

MIT

1.3.9

10 years ago

1.2.9

10 years ago

1.2.8

10 years ago

1.2.7

10 years ago

1.2.6

10 years ago

1.2.5

10 years ago

1.2.4

10 years ago

1.2.3

10 years ago

1.2.2

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago