very-simple-table-lib

0.1.7 • Public • Published

Getting Started with very simple table lib

This project was bootstrapped with Create React App.

How to install

In your project directory type the following commande

 npm install very-simple-table-lib

Features

Easy to use
Number of entries per page
Sorting
Search field
Jump page

How to use

import Table from 'very-simple-table-lib/dist/components/Table'

then you need to pass data in JSON format and an object containing what data to display and the corresponding thead in this fashion

const yourJSON = {people:[
    {
        "firstName": "me",
        "lastName": "you",
        "dateOfBirth": "tommorow",
        "country": "international waters"
    },
    ....
]}

now you choose what data you want to display on the table and in what order

const keys = {country: "Country column", firstName: "First name column"}

return <Table data={yourJSON} keys={dataToShow}/>

output:

Country column First name column
international waters me
... ...

Github

Code available at Github

Package Sidebar

Install

npm i very-simple-table-lib

Weekly Downloads

1

Version

0.1.7

License

none

Unpacked Size

40.9 kB

Total Files

18

Last publish

Collaborators

  • mehoody