an_table
v0.1.7
Published
This is a re-usable Table
Readme
an_table_package
This is a re-usable Table
usage
import Table from 'an_table_package';
const columns = [
{
field:"id",
header:"ID",
cellType : "text"
},
{
field:"name",
header:"Name",
cellType : "object"
},
{
field:"age",
header:"Age",
cellType : "text"
},
{
field:"email",
header:"Email",
cellType : "object"
},
{
field:"mobile",
header:"mobile",
cellType : "array"
},
{
field:"subjects",
header:"subjects",
cellType : "arrayOfObjects"
},]
const data = [ { id:1, name:{ fisrtname : "Student1 firstname", lastname : "Student1 lastname" }, age:20, email:{ primary : "[email protected]", secondary : "[email protected]" }, mobile: [11111111111,22222222]
},
{
id:2,
name:{
fisrtname : "Student2 firstname",
lastname : "Student2 lastname"
},
age:20,
email:{
primary : "[email protected]",
secondary : "[email protected]"
},
mobile: [11111111111,22222222]
},
{
id:3,
name:{
fisrtname : "Student3 firstname",
lastname : "Student3 lastname"
},
age:20,
email:{
primary : "[email protected]",
secondary : "[email protected]"
},
mobile: [11111111111,22222222],
}]
const columns = [
{
field: "id",
header: "ID",
cellType: "text"
},
{
field: "first_name",
header: "Fisrtname",
cellType: "text"
},
{
field: "last_name",
header: "Lastname",
cellType: "text"
},
{
field: "email",
header: "Email",
cellType: "text"
},
{
field: "mobile number",
header: "Mobile",
cellType: "text"
},
{
field: "gender",
header: "Gender",
cellType: "text"
},]
const data = [{"id":1,"first_name":"Petronia","last_name":"Lindsay","gender":"Female","mobile number":"702-719-4798","email":"[email protected]"}, {"id":2,"first_name":"Chrisy","last_name":"McElhargy","gender":"Male","mobile number":"676-100-4085","email":"[email protected]"}, {"id":3,"first_name":"Giovanna","last_name":"Itzcovichch","gender":"Female","mobile number":"741-829-3371","email":"[email protected]"}, {"id":4,"first_name":"Genna","last_name":"Ilett","gender":"Female","mobile number":"120-750-2598","email":"[email protected]"}, {"id":5,"first_name":"Rudolfo","last_name":"Towle","gender":"Male","mobile number":"851-943-2821","email":"[email protected]"}, {"id":6,"first_name":"Hollis","last_name":"Spataro","gender":"Male","mobile number":"358-224-6130","email":"[email protected]"}, {"id":7,"first_name":"Mahmud","last_name":"Whitehorn","gender":"Male","mobile number":"957-460-6302","email":"[email protected]"}, {"id":8,"first_name":"Alastair","last_name":"Ionnisian","gender":"Male","mobile number":"958-256-2385","email":"[email protected]"}, {"id":9,"first_name":"Hazlett","last_name":"Crampsey","gender":"Male","mobile number":"272-840-8651","email":"[email protected]"}, {"id":10,"first_name":"Joletta","last_name":"Lemmon","gender":"Female","mobile number":"406-173-9836","email":"[email protected]"}, {"id":11,"first_name":"Tanhya","last_name":"Loins","gender":"Female","mobile number":"420-883-1586","email":"[email protected]"}, {"id":12,"first_name":"Elisabet","last_name":"McGrath","gender":"Female","mobile number":"885-720-6757","email":"[email protected]"}, {"id":13,"first_name":"Elvera","last_name":"Hardison","gender":"Female","mobile number":"929-743-8432","email":"[email protected]"}]
