0.0.7 • Published 2 years ago
data-tables-plugin-hrnet v0.0.7
Getting Started
The data-tables-plugin-hrnet
as its name suggests, is a plugins developed as part of my OpenClassRooms training program.
It's quite simply a React plugin allowing to display a data table, for more information go to the section "How the plugin works"
Installation
$ npm install npm i data-tables-plugin-hrnet
How the plugin works
Import module:
import import { DataTables } from "data-tables-plugin-hrnet";
Create your Header for the data table:
import { dataHeader } from "../yourData";
format of your Header:
const dataHeader = ["Firstname", "Lastname", "Start", "Department"];
format of your rows data:
const tableItem = [
{
nameofyourcolumn: "nameofyourrows",
nameofyourcolumn: "nameofyourrows",
nameofyourcolumn: "nameofyourrows",
nameofyourcolumn: "nameofyourrows",
},
{
nameofyourcolumn: "nameofyourrows",
nameofyourcolumn: "nameofyourrows",
nameofyourcolumn: "nameofyourrows",
nameofyourcolumn: "nameofyourrows",
},
];
Import your rows data:
import { rows } from "../your rows data";
Render your dataTable in your component:
return (
<>
<DataTables dataHeader={dataHeader} tableItem={rows} />
</>
);
More about this plugin
To know more about this plugin or on my work, do not hesitate to contact me on my main networks Linkedin - GitHub