{"_id":"react-advanced-datatable","_rev":"34-e01e2bc9b74ee9005da3f537998d5040","time":{"created":"2023-11-03T10:14:30.144Z","1.0.0":"2023-01-19T09:46:13.757Z","modified":"2024-04-30T05:52:48.272Z","1.0.1":"2023-01-19T10:00:43.158Z","1.0.2":"2023-01-19T13:50:57.617Z","1.0.3":"2023-01-19T14:02:42.016Z","1.0.4":"2023-01-19T14:04:04.580Z","0.1.0":"2023-01-20T14:39:29.828Z","1.0.5":"2023-01-20T14:39:47.376Z","1.0.6":"2023-01-20T14:46:56.418Z","1.0.7":"2023-01-20T14:50:03.129Z","1.0.8":"2023-01-20T14:50:29.964Z","1.0.9":"2023-01-20T14:55:04.355Z","1.1.1":"2023-02-18T20:44:13.793Z","1.1.2":"2023-02-18T20:53:58.998Z","1.1.3":"2023-02-18T20:58:42.294Z","1.1.4":"2023-02-18T21:03:57.442Z","1.1.5":"2023-03-19T09:38:54.408Z","1.1.6":"2023-03-19T09:45:05.237Z","1.1.7":"2023-04-07T10:58:02.729Z","2.0.0":"2023-04-07T11:27:51.367Z","2.0.1":"2023-04-07T11:46:49.995Z","2.0.2":"2023-04-07T11:51:25.150Z","2.0.3":"2023-04-07T12:04:53.405Z","2.0.4":"2023-04-07T12:08:03.722Z","2.0.5":"2023-04-07T12:22:54.894Z","2.0.6":"2023-04-07T12:25:47.875Z","2.0.7":"2023-05-28T17:42:11.506Z","2.0.8":"2023-05-28T17:56:35.252Z","2.1.0":"2023-11-03T10:14:30.444Z","2.1.1":"2023-11-08T07:58:29.561Z","2.1.2":"2023-11-08T08:19:21.417Z","2.1.3":"2023-11-08T08:37:47.874Z","2.1.4":"2024-04-30T05:52:48.099Z"},"name":"react-advanced-datatable","dist-tags":{"latest":"2.1.4"},"versions":{"2.1.0":{"name":"react-advanced-datatable","version":"2.1.0","description":"Made with create-react-library","author":{"name":"Arnoldkhosa"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Arnoldkhosa/react-advanced-datatable.git"},"main":"dist/index.js","module":"dist/index.modern.js","source":"src/index.js","engines":{"node":">=10"},"scripts":{"build":"microbundle-crl --no-compress --format modern,cjs --jsxFragment React.Fragment","start":"microbundle-crl watch --no-compress --format modern,cjs --jsxFragment React.Fragment","prepare":"run-s build","test":"run-s test:unit test:lint test:build","test:build":"run-s build","test:lint":"eslint .","test:unit":"cross-env CI=1 react-scripts test --env=jsdom","test:watch":"react-scripts test --env=jsdom","predeploy":"cd example && npm install && npm run build","deploy":"gh-pages -d example/build"},"peerDependencies":{"react":"^16.0.0"},"devDependencies":{"microbundle-crl":"^0.13.10","babel-eslint":"^10.0.3","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.7.0","eslint-config-standard":"^14.1.0","eslint-config-standard-react":"^9.2.0","eslint-plugin-import":"^2.18.2","eslint-plugin-node":"^11.0.0","eslint-plugin-prettier":"^3.1.1","eslint-plugin-promise":"^4.2.1","eslint-plugin-react":"^7.17.0","eslint-plugin-standard":"^4.0.1","gh-pages":"^2.2.0","npm-run-all":"^4.1.5","prettier":"^2.0.4","react":"^16.13.1","react-dom":"^16.13.1","react-scripts":"^3.4.1"},"_id":"react-advanced-datatable@2.1.0","gitHead":"95a27e6d9960e7d2892944fae1d5749198edec79","bugs":{"url":"https://github.com/Arnoldkhosa/react-advanced-datatable/issues"},"homepage":"https://github.com/Arnoldkhosa/react-advanced-datatable#readme","_nodeVersion":"18.17.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-ZBe7S5Z0Trttc7GW1pj9r691bKpre3WLOXre/LBZ/mjXL8+WwthVK92QsHSibRZ8V3yqss3o08EzKev/p0QqgQ==","shasum":"230fc958b4f335e8e8e9883c31ab6a66d93ca52f","tarball":"https://registry.npmjs.org/react-advanced-datatable/-/react-advanced-datatable-2.1.0.tgz","fileCount":7,"unpackedSize":591973,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGNH49Y+ph9n0M7WpoqIFnwJETA6vt1Wpd5yhb2l58ahAiEAtJ/pxJTruPac/5JIb2hevlzVE5bCDSrqa4StSGP8a30="}]},"_npmUser":{"name":"arnold_khosa","email":"arnoldkhosa2552@gmail.com"},"directories":{},"maintainers":[{"name":"arnold_khosa","email":"arnoldkhosa2552@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-advanced-datatable_2.1.0_1699006470145_0.1750466730201039"},"_hasShrinkwrap":false},"2.1.1":{"name":"react-advanced-datatable","version":"2.1.1","description":"Made with create-react-library","author":{"name":"Arnoldkhosa"},"license":"MIT","repository":{"type":"git","url":"git+https://bitbucket.org/Arnold_Khosa/react-advanced-datatable.git"},"main":"dist/index.js","module":"dist/index.modern.js","source":"src/index.js","engines":{"node":">=10"},"scripts":{"build":"microbundle-crl --no-compress --format modern,cjs --jsxFragment React.Fragment","start":"microbundle-crl watch --no-compress --format modern,cjs --jsxFragment React.Fragment","prepare":"run-s build","test":"run-s test:unit test:lint test:build","test:build":"run-s build","test:lint":"eslint .","test:unit":"cross-env CI=1 react-scripts test --env=jsdom","test:watch":"react-scripts test --env=jsdom","predeploy":"cd example && npm install && npm run build","deploy":"gh-pages -d example/build"},"peerDependencies":{"react":"^16.0.0"},"devDependencies":{"microbundle-crl":"^0.13.10","babel-eslint":"^10.0.3","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.7.0","eslint-config-standard":"^14.1.0","eslint-config-standard-react":"^9.2.0","eslint-plugin-import":"^2.18.2","eslint-plugin-node":"^11.0.0","eslint-plugin-prettier":"^3.1.1","eslint-plugin-promise":"^4.2.1","eslint-plugin-react":"^7.17.0","eslint-plugin-standard":"^4.0.1","gh-pages":"^2.2.0","npm-run-all":"^4.1.5","prettier":"^2.0.4","react":"^16.13.1","react-dom":"^16.13.1","react-scripts":"^3.4.1"},"_id":"react-advanced-datatable@2.1.1","gitHead":"451da0981f6299d4321a0f418b35ffeee26ba703","bugs":{"url":"https://bitbucket.org/Arnold_Khosa/react-advanced-datatable/issues"},"homepage":"https://bitbucket.org/Arnold_Khosa/react-advanced-datatable#readme","_nodeVersion":"18.17.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-/gFSq2r4oGIOdWw8jiINx3dZHVBj4vJEfcHyOwQN+TJF+/HELepbzSNWNFt6fQcNHNc5UE9YWeuV1/aKXwfZuQ==","shasum":"32e5b8007c7b1bb4b19d35c613628fac4dc35850","tarball":"https://registry.npmjs.org/react-advanced-datatable/-/react-advanced-datatable-2.1.1.tgz","fileCount":7,"unpackedSize":606972,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC6jT/8jTBJUENJ7DaexrkJPv/v/9JxVI6vqfAnxC2MeAiEA/6D6Lsvco+7u9n0b5nmnrlwuL4Wg5/IlTdWoKzQ1qDI="}]},"_npmUser":{"name":"arnold_khosa","email":"arnoldkhosa2552@gmail.com"},"directories":{},"maintainers":[{"name":"arnold_khosa","email":"arnoldkhosa2552@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-advanced-datatable_2.1.1_1699430309263_0.5397584438094571"},"_hasShrinkwrap":false},"2.1.2":{"name":"react-advanced-datatable","version":"2.1.2","description":"Made with create-react-library","author":{"name":"Arnoldkhosa"},"license":"MIT","repository":{"type":"git","url":"git+https://bitbucket.org/Arnold_Khosa/react-advanced-datatable.git"},"main":"dist/index.js","module":"dist/index.modern.js","source":"src/index.js","engines":{"node":">=10"},"scripts":{"build":"microbundle-crl --no-compress --format modern,cjs --jsxFragment React.Fragment","start":"microbundle-crl watch --no-compress --format modern,cjs --jsxFragment React.Fragment","prepare":"run-s build","test":"run-s test:unit test:lint test:build","test:build":"run-s build","test:lint":"eslint .","test:unit":"cross-env CI=1 react-scripts test --env=jsdom","test:watch":"react-scripts test --env=jsdom","predeploy":"cd example && npm install && npm run build","deploy":"gh-pages -d example/build"},"peerDependencies":{"react":"^16.0.0"},"devDependencies":{"microbundle-crl":"^0.13.10","babel-eslint":"^10.0.3","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.7.0","eslint-config-standard":"^14.1.0","eslint-config-standard-react":"^9.2.0","eslint-plugin-import":"^2.18.2","eslint-plugin-node":"^11.0.0","eslint-plugin-prettier":"^3.1.1","eslint-plugin-promise":"^4.2.1","eslint-plugin-react":"^7.17.0","eslint-plugin-standard":"^4.0.1","gh-pages":"^2.2.0","npm-run-all":"^4.1.5","prettier":"^2.0.4","react":"^16.13.1","react-dom":"^16.13.1","react-scripts":"^3.4.1"},"_id":"react-advanced-datatable@2.1.2","gitHead":"451da0981f6299d4321a0f418b35ffeee26ba703","bugs":{"url":"https://bitbucket.org/Arnold_Khosa/react-advanced-datatable/issues"},"homepage":"https://bitbucket.org/Arnold_Khosa/react-advanced-datatable#readme","_nodeVersion":"18.17.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-l3t99AfGXJrkMshMCoiR9slbjfTG4hBWPMUGHE2d+sPJIXR39E+k4dgCGcpD5rUXqmMcNzPR4io1eciN7t1BFw==","shasum":"a46a2b8c6a8d01b85e075beb6ccb5765203330d7","tarball":"https://registry.npmjs.org/react-advanced-datatable/-/react-advanced-datatable-2.1.2.tgz","fileCount":7,"unpackedSize":609069,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICPvXFy32WrGdlUY2l/sRFKRpvHbAq5zn1w2UoCr1uXrAiA4SAcF+5uR9lYcZFsxbmD0K5K/5ONxk/cTD+n1h3U6/w=="}]},"_npmUser":{"name":"arnold_khosa","email":"arnoldkhosa2552@gmail.com"},"directories":{},"maintainers":[{"name":"arnold_khosa","email":"arnoldkhosa2552@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-advanced-datatable_2.1.2_1699431561030_0.38484783603477846"},"_hasShrinkwrap":false},"2.1.3":{"name":"react-advanced-datatable","version":"2.1.3","description":"Made with create-react-library","author":{"name":"Arnoldkhosa"},"license":"MIT","repository":{"type":"git","url":"git+https://bitbucket.org/Arnold_Khosa/react-advanced-datatable.git"},"main":"dist/index.js","module":"dist/index.modern.js","source":"src/index.js","engines":{"node":">=10"},"scripts":{"build":"microbundle-crl --no-compress --format modern,cjs --jsxFragment React.Fragment","start":"microbundle-crl watch --no-compress --format modern,cjs --jsxFragment React.Fragment","prepare":"run-s build","test":"run-s test:unit test:lint test:build","test:build":"run-s build","test:lint":"eslint .","test:unit":"cross-env CI=1 react-scripts test --env=jsdom","test:watch":"react-scripts test --env=jsdom","predeploy":"cd example && npm install && npm run build","deploy":"gh-pages -d example/build"},"peerDependencies":{"react":"^16.0.0"},"devDependencies":{"microbundle-crl":"^0.13.10","babel-eslint":"^10.0.3","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.7.0","eslint-config-standard":"^14.1.0","eslint-config-standard-react":"^9.2.0","eslint-plugin-import":"^2.18.2","eslint-plugin-node":"^11.0.0","eslint-plugin-prettier":"^3.1.1","eslint-plugin-promise":"^4.2.1","eslint-plugin-react":"^7.17.0","eslint-plugin-standard":"^4.0.1","gh-pages":"^2.2.0","npm-run-all":"^4.1.5","prettier":"^2.0.4","react":"^16.13.1","react-dom":"^16.13.1","react-scripts":"^3.4.1"},"_id":"react-advanced-datatable@2.1.3","gitHead":"451da0981f6299d4321a0f418b35ffeee26ba703","bugs":{"url":"https://bitbucket.org/Arnold_Khosa/react-advanced-datatable/issues"},"homepage":"https://bitbucket.org/Arnold_Khosa/react-advanced-datatable#readme","_nodeVersion":"18.17.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-LHIxNxK02Rmj8MyZlrQAbWqTZwvzuGNt268Jl8i95LBTlrMQ+p1hfYQdnN1GDwdKquVrWvuWPVGxLYcR5i18xw==","shasum":"2335f799a3b52ea0ea422bf6d816700e31005a6c","tarball":"https://registry.npmjs.org/react-advanced-datatable/-/react-advanced-datatable-2.1.3.tgz","fileCount":7,"unpackedSize":609070,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLUDjpIzLUNqbwGlWBUuQHsg+j/n5xA45iAbcBdOKMMAIhAPbqN1ZyBnam7AVLDlzM1dwG5neBhCSdf4ZZohroG+e1"}]},"_npmUser":{"name":"arnold_khosa","email":"arnoldkhosa2552@gmail.com"},"directories":{},"maintainers":[{"name":"arnold_khosa","email":"arnoldkhosa2552@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-advanced-datatable_2.1.3_1699432667556_0.5540350630110296"},"_hasShrinkwrap":false},"2.1.4":{"name":"react-advanced-datatable","version":"2.1.4","description":"Made with create-react-library","author":{"name":"Arnoldkhosa"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Arnoldkhosa/react-advanced-datatable.git"},"main":"dist/index.js","module":"dist/index.modern.js","source":"src/index.js","engines":{"node":">=10"},"scripts":{"build":"microbundle-crl --no-compress --format modern,cjs --jsxFragment React.Fragment","start":"microbundle-crl watch --no-compress --format modern,cjs --jsxFragment React.Fragment","prepare":"run-s build","test":"run-s test:unit test:lint test:build","test:build":"run-s build","test:lint":"eslint .","test:unit":"cross-env CI=1 react-scripts test --env=jsdom","test:watch":"react-scripts test --env=jsdom","predeploy":"cd example && npm install && npm run build","deploy":"gh-pages -d example/build"},"peerDependencies":{"react":"^16.0.0"},"devDependencies":{"microbundle-crl":"^0.13.10","babel-eslint":"^10.0.3","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.7.0","eslint-config-standard":"^14.1.0","eslint-config-standard-react":"^9.2.0","eslint-plugin-import":"^2.18.2","eslint-plugin-node":"^11.0.0","eslint-plugin-prettier":"^3.1.1","eslint-plugin-promise":"^4.2.1","eslint-plugin-react":"^7.17.0","eslint-plugin-standard":"^4.0.1","gh-pages":"^2.2.0","npm-run-all":"^4.1.5","prettier":"^2.0.4","react":"^16.13.1","react-dom":"^16.13.1","react-scripts":"^3.4.1"},"_id":"react-advanced-datatable@2.1.4","gitHead":"451da0981f6299d4321a0f418b35ffeee26ba703","bugs":{"url":"https://github.com/Arnoldkhosa/react-advanced-datatable/issues"},"homepage":"https://github.com/Arnoldkhosa/react-advanced-datatable#readme","_nodeVersion":"18.20.0","_npmVersion":"10.5.0","dist":{"integrity":"sha512-t6wPmU0P2cICLueveSOwXWT/Vzyla7j2BJi68wr/EsKTNcs6d3Rzq7+E2iOxeZEYgvvKwyQsp+4pF3QQm1uWnQ==","shasum":"a8721be6cd16b6cb055845012fe99142ac364bc4","tarball":"https://registry.npmjs.org/react-advanced-datatable/-/react-advanced-datatable-2.1.4.tgz","fileCount":7,"unpackedSize":605958,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6iu/zUos8PBNYg2NzaHSqh+EQHaihmcuTMY2AxRyGAQIgM3obo7hcDXGko2Se6wITC8edpgDTt89XEviynVKh6Og="}]},"_npmUser":{"name":"arnold_khosa","email":"arnoldkhosa2552@gmail.com"},"directories":{},"maintainers":[{"name":"arnold_khosa","email":"arnoldkhosa2552@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-advanced-datatable_2.1.4_1714456367870_0.04973295123220178"},"_hasShrinkwrap":false}},"maintainers":[{"name":"arnold_khosa","email":"arnoldkhosa2552@gmail.com"}],"description":"Made with create-react-library","homepage":"https://github.com/Arnoldkhosa/react-advanced-datatable#readme","repository":{"type":"git","url":"git+https://github.com/Arnoldkhosa/react-advanced-datatable.git"},"author":{"name":"Arnoldkhosa"},"bugs":{"url":"https://github.com/Arnoldkhosa/react-advanced-datatable/issues"},"license":"MIT","readme":"# Getting Started with react-advanced-datatable\n\n    `npm install react-advanced-datatable`\n\n\n## Usage\n1. Import the DataTable component, the necessary CSS styles, and Axios for making API requests:\n```javascript\nimport DataTable from 'react-advanced-datatable';\nimport axios from 'axios';\n```\n2. Define the state for the DataTable component, including the data, current page, rows per page, and total pages:\n```javascript\nconst [state, setState] = useState({\n  rowsPerPage: 3,\n  data: [],\n  currentPage: 2,\n  totalPages: 0,\n});\n```\n\n3. Create a function to fetch the data from the API using Axios, and update the state with the results:\n```javascript\nconst fetchData = async () => {\n  await axios\n    .get(`http://localhost:3001/api/books/page=${state.currentPage}&total=${state.rowsPerPage}`)\n    .then(res => {\n      setState({ ...state, data: res.data.data, totalPages: res.data.total });\n      console.log(res.data);\n    });\n};\n```\n4. Use the useEffect hook to fetch the data when the component mounts:\n```javascript\n<DataTable\n  className={'striped table-bordered package-table'}\n  hideColumns={[\"age\",\"location3\"]}\n  state={state}\n  backendPagination={true}\n  setState={setState}\n  tableOptions={[\n    {\n      column: '#',\n      appearAs: '#',\n      width: '10px',\n      frozen: true,\n      render: (object, value) => (\n        <>\n          <input type=\"checkbox\" className=\"m-auto\" />\n        </>\n      ),\n    },\n    {\n      column: 'age',\n      appearAs: 'Age',\n      width: '180px',\n      frozen: true,\n      render: null,\n    },\n    {\n      column: 'name',\n      appearAs: 'Name',\n      width: '180px',\n      frozen: false,\n      render: null,\n    },\n    {\n      column: 'location3',\n      appearAs: 'Location 3',\n      width: '201px',\n      frozen: false,\n      render: (object, value) => (\n        <>\n          {value}\n          <button className=\"btn btn-sm btn-outline-danger p-0 px-2 ms-auto\" onClick={() => console.log(value)}>\n            view\n          </button>\n        </>\n      ),\n    },\n    {\n      column: 'location4',\n      appearAs: 'Location 4',\n      width: '50px',\n      frozen: false,\n      render: (object, value) => (\n        <button className=\"btn btn-sm btn-outline-danger p-0 px-2 ms-auto\">{value}</button>\n      ),\n    },\n  ]}\n/>\n```\n\n## Props\nThe DataTable component accepts the following props:\n\n* className: The class name for the table. Optional.\n* backendPagination: controls whether you want to paginate data from the server or not.  By default the package paginates from the client side.\n* state: An object that defines the state of the table, including the data, current-page, rows-per-page, and  total-pages. Required.\n* setState: A function to update the state of the table. Required.\n* tableOptions: An array of objects that define the columns of the table, including their name, appearance, width, and rendering function. Required.\n","readmeFilename":"readMe.MD"}