1.1.2 • Published 7 years ago

react-native-data-grid v1.1.2

Weekly downloads
22
License
-
Repository
github
Last release
7 years ago

react-native-data-grid

NPM

npm version

Sample Demo

IOSANDROID
ios.gifdocs/android.gif

A component that performs simple CRUD operations.

To build the examples locally, run:

$ git clone https://github.com/ahmetsahinoglu/react-native-data-grid.git
cd react-native-data-grid/Example && npm install
react-native run-ios or react-native run-android

Then open your emulator.

Installation

npm install react-native-data-grid --save

Usage

First of all you need to give JSON model for grid template.Then you have to give a url or a defaultGridData like Example.

import {DataGrid} from 'react-native-data-grid';

  <DataGrid fields={Model.fields} url="YOUR_URL_PUT_HERE"/>   or
  
  <DataGrid fields={Model.fields} defaultGridData={YOUR_DEFAULT_GRID_DATA}/>

Properties

PropertyTypeDefaultDescription
ajaxConfigobject{method: 'GET',headers: {'Accept': 'application/json','Content-Type': 'application/json'}Read more https://facebook.github.io/react-native/docs/network.html
checkBoxboolfalse
checkedImageelement
checkColumnSizenumber
defaultGridDataarray
fieldsarray
onClickCheckfunctionreturn selected rows
styleobject{marginLeft: 10, marginRight: 10}
toolbarboolfalsedefault toolbar new edit delete
unCheckedImageelement

License

MIT

Copyright (c) 2017 Ahmet Sahinoglu.