0.0.13 • Published 2 years ago

hrnet-tablegenerator v0.0.13

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

HRNET TableGenerator

requirement

  1. You need node and npm installed globally on your computer
  2. This npm package is intended to be used by a react project.

How to install ?

  • using npm: in the command line interface use the following:
  • npm i hrnet-tablegenerator

How to use ?

In the container or component where you want to use the tablegenerator:

  1. First import the component from the node_modules package folder:
import { TableGenerator } from "hrnet-tablegenerator";
  1. Secondly, Format your data to be used by the tablegenerator component:
  • the object needs to be formatted with two properties, columns and nodes
  • the columns property is an array of object with two property key and label (it's used to determined the columns and the functionnality of the component)
  • the nodes property is an array of "rows" object consisting in objects, which property exactly ! match the key of the columns object !

example:

const tableNodes = {
	columns: [
	      {
		key: "firstName",
		label: "First Name",
	      },
	      {
		key: "lastName",
		label: "Last Name",
	      }
      ],
	nodes: [
		{
			"firstName": "Jean",
			"lastName" : "Dupont"
		  },
		  {
			"firstName": "Josie",
			"lastName" : "Franquiche"
		  }
	  ]
};
  1. Thirdly, the component need to be passed an object into it's data props, like so:
<TableGenerator data={tableNodes} />

see the npm package: tableGenerator

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago