All Projects → Jeepeng → react-native-simple-table

Jeepeng / react-native-simple-table

Licence: Apache-2.0 license
A simple table for react native.

Programming Languages

javascript
184084 projects - #8 most used programming language
objective c
16641 projects - #2 most used programming language
python
139335 projects - #7 most used programming language
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to react-native-simple-table

html-table-extractor
extract data from html table
Stars: ✭ 74 (+131.25%)
Mutual labels:  table, html-table
react-tisch
Table component for React and Bootstrap with real React components as cells
Stars: ✭ 17 (-46.87%)
Mutual labels:  table
cryptocharts
Cryptocurrency stats and charts displayed in your terminal.
Stars: ✭ 55 (+71.88%)
Mutual labels:  table
markdown-it-multimd-table
Multimarkdown table syntax plugin for markdown-it markdown parser
Stars: ✭ 104 (+225%)
Mutual labels:  table
outfancy
Python3 library to print tables in Terminal.
Stars: ✭ 47 (+46.88%)
Mutual labels:  table
medium-toc
Easily create a table of contents for your Medium articles in just one click. ✨
Stars: ✭ 33 (+3.13%)
Mutual labels:  table
org-table-sticky-header
Sticky header for org-mode tables
Stars: ✭ 31 (-3.12%)
Mutual labels:  table
jh-weapp-demo
微信小程序项目- 实现一些常用效果、封装通用组件和工具类
Stars: ✭ 60 (+87.5%)
Mutual labels:  table
react-loading-placeholder
Loading placeholer, inspired by Facebook
Stars: ✭ 17 (-46.87%)
Mutual labels:  table
template
Svelte starter template with HMR, code splitting, datatable & modular ui-kit
Stars: ✭ 16 (-50%)
Mutual labels:  table
terraform-aws-dynamodb-autoscaler
Terraform module to provision DynamoDB autoscaler
Stars: ✭ 21 (-34.37%)
Mutual labels:  table
react-datatable
React-datatable is a component which provide ability to create multifunctional table using single component like jQuery Datatable. It's fully customizable and easy to integrate in any react component. Bootstrap compatible.
Stars: ✭ 72 (+125%)
Mutual labels:  table
html-table-to-json
Generate JSON representations of HTML tables
Stars: ✭ 39 (+21.88%)
Mutual labels:  html-table
paper-datatable-api
A material design implementation of a data table
Stars: ✭ 72 (+125%)
Mutual labels:  table
ediTable
Manipulation of table (sort, add, edit, remove, etc... - rows | valid cells, type, require, etc... cells )
Stars: ✭ 14 (-56.25%)
Mutual labels:  table
fast-laravel
基于Swoole的高性能HTTP服务器,加速您Laravel应用程序。
Stars: ✭ 33 (+3.13%)
Mutual labels:  table
sense-export
Just a simple button to export data in your Qlik Sense applications.
Stars: ✭ 28 (-12.5%)
Mutual labels:  table
DTE
Generate C# class from database table
Stars: ✭ 26 (-18.75%)
Mutual labels:  table
termtables
🖥️ Pretty tables in the terminal
Stars: ✭ 85 (+165.63%)
Mutual labels:  table
numpy-html
Render NumPy arrays as HTML tables
Stars: ✭ 38 (+18.75%)
Mutual labels:  table

react-native-simple-table

A simple table for react native.

screenshot

Installation

npm install react-native-simple-table --save

Usage

import React, { Component } from 'react'
import {
  Platform,
  StyleSheet,
  View,
  Text
} from 'react-native'
import Table from 'react-native-simple-table'

import DataFactory from '../mock/DataFactory'

const columns = [
  {
    title: 'Mobile',
    dataIndex: 'mobile',
    width: 105
  },
  {
    title: 'Name',
    dataIndex: 'name',
    width: 140
  },
  {
    title: 'Age',
    dataIndex: 'age'
  },
  {
    title: 'Sex',
    dataIndex: 'sex'
  },
];

class Example extends Component {
  render() {
    let dataSource = DataFactory.generate().data;
    return (
      <View style={styles.container}>
        <Text style={styles.title}>react-native-simple-table</Text>
        <Table height={320} columnWidth={60} columns={columns} dataSource={dataSource} />
      </View>
    )
  }
}

const styles = StyleSheet.create({
  container: {
    ...Platform.select({
      ios: {
        paddingTop: 20
      },
      android: {}
    }),
  },
  title: {
    fontSize: 18,
    padding: 10,
    textAlign: 'center'
  }
});

export default Example
import mockjs, { Random } from 'mockjs'

export default class DataFactory {
  static generate() {
    return mockjs.mock({
      'data|1-20': [{
        'mobile|12300000000-12399999999': 1,
        'name|1': '@first @last',
        'age|18-80': 1,
        'sex|1': () => Random.pick(['male','female']),
      }]
    });
  }
}

API

Table

Property Description Type Default
dataSource data record array to be rendered any[] []
columns columns of table Column[] []
columnWidth column width number 60
renderCell render function function undefined
height table height number 240
headerContainerStyle header container style object {}
headerStyle header text style object {}
bodyContainerStyle body container style object {}
bodyStyle body text style object {}

Column

Property Description Type Default
title title of this column string -
dataIndex display field of the data record string -
width width of this column number -
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].