{"id":21518742,"url":"https://github.com/halo-lab/smart-table","last_synced_at":"2025-04-09T22:08:14.797Z","repository":{"id":45282064,"uuid":"390264659","full_name":"Halo-Lab/smart-table","owner":"Halo-Lab","description":null,"archived":false,"fork":false,"pushed_at":"2022-01-18T07:44:05.000Z","size":451,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T22:08:08.794Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Halo-Lab.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}},"created_at":"2021-07-28T07:58:01.000Z","updated_at":"2023-12-23T07:48:25.000Z","dependencies_parsed_at":"2022-09-13T14:51:05.293Z","dependency_job_id":null,"html_url":"https://github.com/Halo-Lab/smart-table","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Halo-Lab%2Fsmart-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Halo-Lab%2Fsmart-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Halo-Lab%2Fsmart-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Halo-Lab%2Fsmart-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Halo-Lab","download_url":"https://codeload.github.com/Halo-Lab/smart-table/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119294,"owners_count":21050755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-11-24T00:53:46.382Z","updated_at":"2025-04-09T22:08:14.781Z","avatar_url":"https://github.com/Halo-Lab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Description\n\nUsing the react-smart-dynamic-table you can dynamically add, edit, delete columns, headers, cells\n\n# Demo\n\n[DEMO LINK](https://codesandbox.io/s/nifty-jennings-8cu39?file=/src/App.js)\n\n# Installation \n\n```npm i react-smart-dynamic-table```\n\n# API\n\n| Property        | Required           | Type  | Description        | Example           |\n| ------------- |-------------| -----| ------------- |-------------|\n| tableColumns      | yes | arrayof({ header: string, columnData: arrayof(string)}) | initial table data      | ``` tableColumns = {[{ header: 'company', columnData: ['adidas', 'nike', 'puma', 'reebok'] },  { header: 'founded', columnData: ['1949', '1964', '1948', '1958'] }]}```|\n| emptyCellPlaceholder      | no      |   string | empty cell placeholder      | ```emptyCellPlaceholder=\"empty\" ```|\n| tableClasses | no      |   object | keys are values from STYLING section, values are your custom classes, or array of classes | ``` tableClasses={{  table: classes.table,  addRowButton: classes.addRowButton, sendButton: [classes.sendButton, classes.mt] }} ```      |\n| cellSpacing | no      |    string | value to define gap between cells | ```cellSpacing = \"300\"```      |\n| minColumnSize | no      |    number | value to define minimal size of table columns (default ```300px```) | ````minColumnSize={200}```     |\n| onCeilEdit | no      |    function | gets new Table data as a prop, emmits when edit cell | -    |\n| onCeilBlur | no      |    function | gets new Table data as a prop, emmits when cell blurs | -    |\n| onHeaderEdit | no      | function | gets new Table data as a prop, emmits when edit header | -    |\n| onHeaderBlur | no     | function | gets new Table data as a prop, emmits when header blurs | -    |\n| onSendData | no      |    function | gets new Table data as a prop, emmits when click send button | -    |\n\n## STYLING:\n  ### General Buttons\n  * addColumnButton\n  * addRowButton\n  * sendButton\n  ### Modal\n  * modalOverlay\n  * modal\n  * modalText\n  * modalInput\n  * modalSetButton\n  * modalCloseButton\n  ### Table\n  * container\n  * table\n  * tableHead\n  * tableHeadRow\n  * tableHeadCell\n  * tableHeadTextarea\n  * deleteButton\n  * deleteRowButton\n  * tableBody\n  * tableBodyRow\n  * tableBodyCeilTextarea\n\n# Usage\n\n### App.js\n\n```javascript\nimport Table from 'react-smart-dynamic-table'\nimport classes from './App.module.scss';\n\nfunction App() {\n  const tableColumns = [{\n      header: 'name',\n      columnData: ['adidas', 'nike', 'puma', 'reebok']\n    },\n    { \n      header: 'founded', \n      columnData: ['1949', '1964', '1948', '1958'] \n    },\n    { \n      header: 'origin', \n      columnData: ['Germany', '', 'Germany', 'USA'] \n    }\n  ]\n\n  return (\n    \u003cdiv className=\"App\"\u003e\n      \u003cTable \n        tableColumns={tableColumns}\n        tableClasses={{ \n            container: classes.container, \n            addRowButton: classes.addRowButton,\n             sendButton: [classes.sendButton, classes.mt]\n          }}\n      /\u003e\n    \u003c/div\u003e\n  );\n}\n\nexport default App;\n```\n\n### App.module.scss\n\n```\n  .addRowButton {\n    color: red;\n  }\n\n  .sendButton {\n    background-color: black;\n    color: white;\n  }\n\n  .mt {\n    margin-top: 30px;\n  }\n\n  .container {\n    margin-top: 20px;\n  }\n```\nexpected result:\n\n![alt text](/public/result.jpg)\n\n## Word from author\n\nHave fun! ✌️\n\n\u003ca href=\"https://www.halo-lab.com/?utm_source=github\"\u003e\n  \u003cimg src=\"https://dgestran.sirv.com/Images/supported-by-halolab.png\" alt=\"Supported by Halo lab\" height=\"60\"\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalo-lab%2Fsmart-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalo-lab%2Fsmart-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalo-lab%2Fsmart-table/lists"}