<!DOCTYPE html>
<html lang="en">

<head>
  
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title> Home</title>

  <script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script>
  <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
  <script src="./build/entry.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->
  <link href="https://fonts.googleapis.com/css?family=Roboto:100,400,700|Inconsolata,700" rel="stylesheet">
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
  <link type="text/css" rel="stylesheet" href="https://jmblog.github.io/color-themes-for-google-code-prettify/themes/tomorrow-night.min.css">
  <link type="text/css" rel="stylesheet" href="styles/app.min.css">
  <link type="text/css" rel="stylesheet" href="styles/iframe.css">
  <link type="text/css" rel="stylesheet" href="">
  <script async defer src="https://buttons.github.io/buttons.js"></script>

  
</head>



<body class="layout small-header">
    <div id="stickyNavbarOverlay"></div>
    

<div class="top-nav">
    <div class="inner">
        <a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
            <span aria-hidden="true"></span>
            <span aria-hidden="true"></span>
            <span aria-hidden="true"></span>
        </a>
        <div class="logo">
            
             
                <a href="index.html">
                    <h1 class="navbar-item">Argent Bank - Documentation</h1>
                </a>
            
        </div>
        <div class="menu">
            
            <div class="navigation">
                <a
                    href="index.html"
                    class="link"
                >
                    Documentation
                </a>
                
                
                
            </div>
        </div>
    </div>
</div>
    <div id="main">
        <div
            class="sidebar "
            id="sidebarNav"
        >
            
            <nav>
                
                    <h2><a href="index.html">Documentation</a></h2><div class="category"></div><div class="category"><h2>Components</h2><h3>Components</h3><ul><li><a href="DataTable.html">DataTable</a></li><li><a href="Pagination.html">Pagination</a></li></ul></div>
                
            </nav>
        </div>
        <div class="core" id="main-content-wrapper">
            <div class="content">
                <header class="page-title">
                    <p></p>
                    <h1>Home</h1>
                </header>
                



    


    <h3> </h3>










    




    <section>
        <article><h1>react-ab-dataTable</h1>
<p><em>Was made for a student projet for OpenClassrooms.</em></p>
<p>This library is a react component to render a table using two arrays of objects.</p>
<p>The table can be sorted, filtered (using a search input), paginated and the number of row can be change (all can be disable).</p>
<p><a href="https://arthurblanc.github.io/react-ab-data-table/">Documentation</a></p>
<h2>Installation</h2>
<p>Run the following command:</p>
<pre class="prettyprint source"><code># If you use npm:
npm install react-ab-data-table

# If you use yarn:
yarn add react-ab-data-table
</code></pre>
<h2>Usage</h2>
<pre class="prettyprint source"><code>import { DataTable } from &quot;react-ab-data-table&quot;;

const App = () => {
	const columns = [
		{ name: &quot;First Name&quot;, id: &quot;firstName&quot;, sortable: true },
		{ name: &quot;Last Name&quot;, id: &quot;lastName&quot;, sortable: true },
		{ name: &quot;City&quot;, id: &quot;city&quot;, sortable: true },
		{ name: &quot;Birthday&quot;, id: &quot;birthday&quot;, sortable: true },
	];

	const data = [
		{ firstName: &quot;John&quot;, lastName: &quot;Doe&quot;, city: &quot;New York&quot;, birthday: &quot;1980-01-02&quot; },
		{ firstName: &quot;Jane&quot;, lastName: &quot;Doe&quot;, city: &quot;Los Angeles&quot;, birthday: &quot;1985-02-14&quot; },
		{ firstName: &quot;John&quot;, lastName: &quot;Smith&quot;, city: &quot;Chicago&quot;, birthday: &quot;1970-11-22&quot; },
		{ firstName: &quot;Jane&quot;, lastName: &quot;Smith&quot;, city: &quot;Houston&quot;, birthday: &quot;1975-09-30&quot; },
	];

	return (
		&lt;main>
			&lt;DataTable columns={columns} data={data} tableId=&quot;employee&quot; sortId=&quot;lastName&quot; />
		&lt;/main>
	);
};

</code></pre>
<h3>Columns array</h3>
<p>This array is use to render the head columns</p>
<ul>
<li>name: the name of the column displayed in the table header</li>
<li>id: the id of the column</li>
<li>sortable: boolean, if the column is sortable</li>
<li>headColSpan: size of the column in the header bodyColSpan: size of the column in the body</li>
</ul>
<h3>Data array</h3>
<p>This array must contain the data of the table, every object will be a row.</p>
<p>The key must be the id of the column and the value will be the data in the row/column.</p>
<h2>Props list</h2>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr>
<td>data</td>
<td>arrayOf</td>
<td>Yes</td>
<td>The data to be displayed in the table</td>
<td></td>
</tr>
<tr>
<td>columns</td>
<td>arrayOf</td>
<td>Yes</td>
<td>The columns to be displayed in the table</td>
<td></td>
</tr>
<tr>
<td>tableId</td>
<td>string</td>
<td>Yes</td>
<td>The id of the table</td>
<td></td>
</tr>
<tr>
<td>sortId</td>
<td>string</td>
<td>No</td>
<td>The id of the column to be sorted</td>
<td>function()</td>
</tr>
<tr>
<td>itemsPerPageOptions</td>
<td>array</td>
<td>No</td>
<td>The options for the items per page dropdown</td>
<td>[10, 25, 50, 100]</td>
</tr>
<tr>
<td>itemsPerPageSelectionEnabled</td>
<td>bool</td>
<td>No</td>
<td>Whether the items per page dropdown should be enabled</td>
<td>true</td>
</tr>
<tr>
<td>searchEnabled</td>
<td>bool</td>
<td>No</td>
<td>Whether the search input should be enabled</td>
<td>true</td>
</tr>
<tr>
<td>sortSelectionEnabled</td>
<td>bool</td>
<td>No</td>
<td>Whether the sort dropdown should be enabled</td>
<td>true</td>
</tr>
<tr>
<td>tableInfoEnabled</td>
<td>bool</td>
<td>No</td>
<td>Whether the table info should be enabled</td>
<td>true</td>
</tr>
<tr>
<td>paginationEnabled</td>
<td>bool</td>
<td>No</td>
<td>Whether the pagination should be enabled</td>
<td>true</td>
</tr>
<tr>
<td>dataTablesWrapperClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the wrapper div</td>
<td>&quot;data-tables-wrapper&quot;</td>
</tr>
<tr>
<td>dataTablesLengthClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the length div</td>
<td>&quot;data-tables-length&quot;</td>
</tr>
<tr>
<td>dataTablesLengthLabelClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the length label</td>
<td>&quot;data-tables-length-label&quot;</td>
</tr>
<tr>
<td>dataTablesLengthSelectClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the length select</td>
<td>&quot;data-tables-length-select&quot;</td>
</tr>
<tr>
<td>dataTablesLengthOptionClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the length options</td>
<td>&quot;data-tables-length-option&quot;</td>
</tr>
<tr>
<td>dataTablesSearchWrapperClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the search wrapper div</td>
<td>&quot;data-tables-search-wrapper&quot;</td>
</tr>
<tr>
<td>dataTablesSearchLabelClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the search label</td>
<td>&quot;form-label&quot;</td>
</tr>
<tr>
<td>dataTablesSearchInputClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the search input</td>
<td>&quot;form-input&quot;</td>
</tr>
<tr>
<td>dataTablesInfoClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the info div</td>
<td>&quot;data-tables-info&quot;</td>
</tr>
<tr>
<td>dataTablesPaginateClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the paginate div</td>
<td>&quot;data-tables-paginate&quot;</td>
</tr>
<tr>
<td>dataTableClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the table</td>
<td>&quot;data-table&quot;</td>
</tr>
<tr>
<td>dataTableHeaderClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the table header</td>
<td>&quot;data-table-header&quot;</td>
</tr>
<tr>
<td>dataTableHeaderTrClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the table header tr</td>
<td>&quot;data-table-header-tr&quot;</td>
</tr>
<tr>
<td>dataTableHeaderThClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the table header th</td>
<td>&quot;data-table-header-th&quot;</td>
</tr>
<tr>
<td>dataTableHeaderSortedClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the table header th sorted</td>
<td>&quot;sorting&quot;</td>
</tr>
<tr>
<td>dataTableBodyClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the table body</td>
<td>&quot;data-table-body&quot;</td>
</tr>
<tr>
<td>dataTableBodyTrClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the table body tr</td>
<td>&quot;data-table-body-tr&quot;</td>
</tr>
<tr>
<td>dataTableBodyTdClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the table body td</td>
<td>&quot;data-table-body-td&quot;</td>
</tr>
<tr>
<td>dataTableBodyTdSortedClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the table body td sorted</td>
<td>&quot;sorting_1&quot;</td>
</tr>
<tr>
<td>dataTableBodyTdEmptyClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the table body td empty</td>
<td>&quot;data-tables-empty&quot;</td>
</tr>
<tr>
<td>dataTableBodyOddRowClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the table body tr odd</td>
<td>&quot;odd&quot;</td>
</tr>
<tr>
<td>dataTableBodyEvenRowClassName</td>
<td>string</td>
<td>No</td>
<td>The class name of the table body tr even</td>
<td>&quot;even&quot;</td>
</tr>
</tbody>
</table>
<h2>Author</h2>
<p><strong>Arthur Blanc</strong> : <a href="https://github.com/ArthurBlanc/"><strong>GitHub</strong></a> - <a href="https://abcoding.fr/"><strong>Portfolio</strong></a></p></article>
    </section>






            </div>
            
            <footer class="footer">
                <div class="content has-text-centered">
                    <p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a></p>
                    <p class="sidebar-created-by">
                        <a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
                        <a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
                    </p>
                </div>
            </footer>
            
        </div>
        <div id="side-nav" class="side-nav">
        </div>
    </div>
<script src="scripts/app.min.js"></script>
<script>PR.prettyPrint();</script>
<script src="scripts/linenumber.js"> </script>


</body>
</html>