react-native-datatable-component
A React Native datatable component for dynamically perform actions like display, sorting, select, custom design, delete & touch events.
Why this Module?
Not so much complex & unnecessary thing Exists. All those basics functionality which everyone Needs.
Everything with clear & simple!
Preview
Installation
As this module depends on nothing means no dependency require
so, just 1 below step require to install it.
or
Usage
Flexibility
You can easily control it's width by wrapping it with View
ScrollView: Want to Scroll Data?
You can scroll datatable Rows by wrapping it with view and with mentioning height
Props
DataTable component accepts following props.
Name | Type | Default | Is Require |
---|---|---|---|
data | [] of {} | - | Yes |
colNames | [] of Strings | - | Yes |
colSettings | [] of {} | - | No |
noOfPages | Number | 2 | No |
onRowSelect | Func | - | No |
backgroundColor | string, rgba, hex | '#e4edec' | No |
doSort | boolean | true | No |
Constants
Props Explanation
Data
List of Objects
Data must be List of Objects where each object will represent a Row Object's Key will be the Name of Column & value will be your Data.
In above case studentName & age is Names of Column & Values are data in that Column.
- Special Objects Key
- doHighlight
If you want to highlight Any Row then use this
colNames
List of Strings
By Default DataTable shows columns which mentions in colNames & pick up Columns Data/Value from the Data prop.
colSettings
List of Objects
Below is the shape of Objects.
noOfPages
Number
How Many Pages/Sections You want in DataTable!!!
onRowSelect
Function
DataTable passes full row in Object in which colName's value will change according to check press!
In Development
We are developing the rest of Functionality! Soon we made the release!
For Future Issues & Contributions
Any one can Contribute & in case of any issue, open the issue Forum!
GitHub
https://github.com/MuhammadRafeh/react-native-datatable-component