0.0.13 • Published 12 months ago

hrnet-tablegenerator v0.0.13

Weekly downloads
-
License
-
Repository
-
Last release
12 months 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

12 months ago

0.0.11

12 months ago

0.0.12

12 months ago

0.0.13

12 months ago

0.0.9

12 months ago

0.0.8

12 months ago

0.0.7

12 months ago

0.0.6

12 months ago

0.0.5

12 months ago

0.0.4

12 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago