{"id":25846563,"url":"https://github.com/audmes/oc_p14_npm_component","last_synced_at":"2026-02-09T22:33:16.027Z","repository":{"id":255855812,"uuid":"853363801","full_name":"Audmes/OC_P14_Npm_Component","owner":"Audmes","description":"Cette bibliothèque est un composant React permettant de restituer un tableau à l'aide de deux tableaux d'objets.","archived":false,"fork":false,"pushed_at":"2024-09-19T09:41:37.000Z","size":635,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-23T02:57:07.864Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://audmes.github.io/OC_P14_Npm_Component","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Audmes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-06T14:05:10.000Z","updated_at":"2025-02-21T00:58:16.000Z","dependencies_parsed_at":"2025-03-01T09:43:11.835Z","dependency_job_id":null,"html_url":"https://github.com/Audmes/OC_P14_Npm_Component","commit_stats":null,"previous_names":["audmes/oc_p14_npm_component"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Audmes/OC_P14_Npm_Component","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Audmes%2FOC_P14_Npm_Component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Audmes%2FOC_P14_Npm_Component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Audmes%2FOC_P14_Npm_Component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Audmes%2FOC_P14_Npm_Component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Audmes","download_url":"https://codeload.github.com/Audmes/OC_P14_Npm_Component/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Audmes%2FOC_P14_Npm_Component/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29283654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T21:57:15.303Z","status":"ssl_error","status_checked_at":"2026-02-09T21:57:11.537Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-01T09:32:50.766Z","updated_at":"2026-02-09T22:33:16.013Z","avatar_url":"https://github.com/Audmes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OC_P14_Npm_Component\n*Was made for a student projet for OpenClassrooms.*\n\nThis library is a react component to render a table using two arrays of objects.\n\nThe table can be sorted, filtered (using a search input), paginated and the number of row can be change (all can be disable).\n\n[Documentation](https://audmes.github.io/OC_P14_Npm_Component/)\n\n## Installation\nRun the following command:\n````\n# If you use npm:\nnpm install react-data-table-by-audmes\n\n# If you use yarn:\nyarn add react-data-table-by-audmes\n````\n\n## Usage\n````\nimport { DataTable } from \"react-data-table-by-audmes\";\n\nconst App = () =\u003e {\n\tconst columns = [\n\t\t{ name: \"First Name\", id: \"firstName\", sortable: true },\n\t\t{ name: \"Last Name\", id: \"lastName\", sortable: true },\n\t\t{ name: \"City\", id: \"city\", sortable: true },\n\t\t{ name: \"Birthday\", id: \"birthday\", sortable: true },\n\t];\n\n\tconst data = [\n\t\t{ firstName: \"John\", lastName: \"Doe\", city: \"New York\", birthday: \"1980-01-02\" },\n\t\t{ firstName: \"Jane\", lastName: \"Doe\", city: \"Los Angeles\", birthday: \"1985-02-14\" },\n\t\t{ firstName: \"John\", lastName: \"Smith\", city: \"Chicago\", birthday: \"1970-11-22\" },\n\t\t{ firstName: \"Jane\", lastName: \"Smith\", city: \"Houston\", birthday: \"1975-09-30\" },\n\t];\n\n\treturn (\n\t\t\u003cmain\u003e\n\t\t\t\u003cDataTable columns={columns} data={data} tableId=\"employee\" sortId=\"lastName\" /\u003e\n\t\t\u003c/main\u003e\n\t);\n};\n\n````\n### Columns array\nThis array is use to render the head columns\n- name: the name of the column displayed in the table header\n- id: the id of the column\n- sortable: boolean, if the column is sortable\n- headColSpan: size of the column in the header bodyColSpan: size of the column in the body\n\n### Data array\nThis array must contain the data of the table, every object will be a row.\n\nThe key must be the id of the column and the value will be the data in the row/column.\n\n## Props list\n|Name|Type|Required|Description|Default|\n|--- |--- |--- |--- |--- |\n|data|arrayOf|Yes|The data to be displayed in the table||\n|columns|arrayOf|Yes|The columns to be displayed in the table||\n|tableId|string|Yes|The id of the table||\n|sortId|string|No|The id of the column to be sorted|function()|\n|itemsPerPageOptions|array|No|The options for the items per page dropdown|[10, 25, 50, 100]|\n|itemsPerPageSelectionEnabled|bool|No|Whether the items per page dropdown should be enabled|true|\n|searchEnabled|bool|No|Whether the search input should be enabled|true|\n|sortSelectionEnabled|bool|No|Whether the sort dropdown should be enabled|true|\n|tableInfoEnabled|bool|No|Whether the table info should be enabled|true|\n|paginationEnabled|bool|No|Whether the pagination should be enabled|true|\n|dataTablesWrapperClassName|string|No|The class name of the wrapper div|\"data-tables-wrapper\"|\n|dataTablesLengthClassName|string|No|The class name of the length div|\"data-tables-length\"|\n|dataTablesLengthLabelClassName|string|No|The class name of the length label|\"data-tables-length-label\"|\n|dataTablesLengthSelectClassName|string|No|The class name of the length select|\"data-tables-length-select\"|\n|dataTablesLengthOptionClassName|string|No|The class name of the length options|\"data-tables-length-option\"|\n|dataTablesSearchWrapperClassName|string|No|The class name of the search wrapper div|\"data-tables-search-wrapper\"|\n|dataTablesSearchLabelClassName|string|No|The class name of the search label|\"form-label\"|\n|dataTablesSearchInputClassName|string|No|The class name of the search input|\"form-input\"|\n|dataTablesInfoClassName|string|No|The class name of the info div|\"data-tables-info\"|\n|dataTablesPaginateClassName|string|No|The class name of the paginate div|\"data-tables-paginate\"|\n|dataTableClassName|string|No|The class name of the table|\"data-table\"|\n|dataTableHeaderClassName|string|No|The class name of the table header|\"data-table-header\"|\n|dataTableHeaderTrClassName|string|No|The class name of the table header tr|\"data-table-header-tr\"|\n|dataTableHeaderThClassName|string|No|The class name of the table header th|\"data-table-header-th\"|\n|dataTableHeaderSortedClassName|string|No|The class name of the table header th sorted|\"sorting\"|\n|dataTableBodyClassName|string|No|The class name of the table body|\"data-table-body\"|\n|dataTableBodyTrClassName|string|No|The class name of the table body tr|\"data-table-body-tr\"|\n|dataTableBodyTdClassName|string|No|The class name of the table body td|\"data-table-body-td\"|\n|dataTableBodyTdSortedClassName|string|No|The class name of the table body td sorted|\"sorting_1\"|\n|dataTableBodyTdEmptyClassName|string|No|The class name of the table body td empty|\"data-tables-empty\"|\n|dataTableBodyOddRowClassName|string|No|The class name of the table body tr odd|\"odd\"|\n|dataTableBodyEvenRowClassName|string|No|The class name of the table body tr even|\"even\"|\n\n## Author\n**Audrey Mesnage** : [**GitHub**](https://github.com/Audmes/) - [**Portfolio**](https://amsprods.com/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faudmes%2Foc_p14_npm_component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faudmes%2Foc_p14_npm_component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faudmes%2Foc_p14_npm_component/lists"}