{"id":17998193,"url":"https://github.com/primaryobjects/react-delete-row","last_synced_at":"2026-02-19T14:31:58.794Z","repository":{"id":65483157,"uuid":"378253659","full_name":"primaryobjects/react-delete-row","owner":"primaryobjects","description":"ReactJs component for deleting a table row with a fade effect.","archived":false,"fork":false,"pushed_at":"2024-06-08T04:41:22.000Z","size":451,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T07:03:50.796Z","etag":null,"topics":["bootstrap","css","fade","html5","npm-module","npm-package","react","react-native","reactjs","table","typescript"],"latest_commit_sha":null,"homepage":"","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/primaryobjects.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":"2021-06-18T20:02:05.000Z","updated_at":"2024-06-08T04:41:25.000Z","dependencies_parsed_at":"2024-10-29T22:04:03.499Z","dependency_job_id":null,"html_url":"https://github.com/primaryobjects/react-delete-row","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"77aeb0090750a9f62412a2d62809ddc5b71914cf"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/primaryobjects/react-delete-row","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Freact-delete-row","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Freact-delete-row/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Freact-delete-row/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Freact-delete-row/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/primaryobjects","download_url":"https://codeload.github.com/primaryobjects/react-delete-row/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Freact-delete-row/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29618283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T13:04:20.082Z","status":"ssl_error","status_checked_at":"2026-02-19T13:03:33.775Z","response_time":117,"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":["bootstrap","css","fade","html5","npm-module","npm-package","react","react-native","reactjs","table","typescript"],"created_at":"2024-10-29T21:24:29.155Z","updated_at":"2026-02-19T14:31:58.776Z","avatar_url":"https://github.com/primaryobjects.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"React Delete Row\n================\n\nA ReactJs UI component for rendering a table row with a delete button and fade effect.\n\n## Screenshot\n\n![ReactJs component for deleting a row in a table with a fade effect.](https://raw.githubusercontent.com/primaryobjects/react-delete-row/master/screenshot.gif)\n\nTry the [Demo](https://plnkr.co/edit/VwDltPC0SW90lCHx?preview)\n\n## Usage\n\n1. Install the react-delete-row module from npm.\n\n```bash\nnpm install react-delete-row\n```\n\n2. Render an array of data in a table, with the first table body `\u003ctr\u003e` defined with `\u003cReactDeleteRow\u003e`.\n\n```js\nimport ReactDeleteRow from 'react-delete-row';\n\n// ...\n\nconst App = () =\u003e {\n  const data = [\n    { title: 'One', body: 'one' },\n    { title: 'Two', body: 'two' },\n    { title: 'Three', body: 'three' }\n  ];\n\n  return (\n    \u003ctable className=\"table\"\u003e\n        \u003cthead\u003e\n            \u003ctr\u003e\n                \u003cth scope=\"col\"\u003eTitle\u003c/th\u003e\n                \u003cth scope=\"col\"\u003eBody\u003c/th\u003e\n                \u003cth scope=\"col\"\u003e\u003c/th\u003e\n            \u003c/tr\u003e\n        \u003c/thead\u003e\n        \u003ctbody\u003e\n            { data.map((item, i) =\u003e { return (\n            \u003cReactDeleteRow key={i} data={item} onDelete={ item =\u003e { return window.confirm(`Are you sure?`) }}\u003e\n                \u003ctd\u003e{item.title}\u003c/td\u003e\n                \u003ctd\u003e{item.body}\u003c/td\u003e\n            \u003c/ReactDeleteRow\u003e\n            )}) }\n        \u003c/tbody\u003e\n    \u003c/table\u003e\n  );\n}\n```\n\n## Options\n\nThe following options are available on ReactDeleteRow:\n\n- `data` - Payload data to return in event handler callbacks (onDelete, etc).\n\n- `className` - CSS class to apply to the table row. *Optional*\n\n- `iconClassName` - CSS class to apply to the delete icon. *Optional*\n\n- `delay` - Number of milliseconds for the fade effect before removing the row from the DOM. *Default is 300ms*\n\n- `deleteElement` - String or JSX elements (HTML) to render for the delete icon. *Default is 'X'*\n\n- `onDelete` - Callback event handler for when the delete icon is clicked. Return `TRUE` to fade the row and remove from the DOM. Return `FALSE` to prevent removing the row. *Optional*\n\n- `onDeleteComplete` - Callback event handler for after the row has been removed from the DOM. *Optional*\n\n### Example Options\n\n```js\n\u003cReactDeleteRow\n  key={i}\n  data={item}\n  deleteElement={ \u003ci className=\"fas fa-trash-alt\" /\u003e }\n  iconClassName='text-danger'\n  className='text-success'\n  onDelete={ item =\u003e { return window.confirm(`Are you sure you want to delete \"${item.title}\"?`) }}\u003e\n    \u003ctd\u003e{item.title}\u003c/td\u003e\n    \u003ctd\u003e{item.body}\u003c/td\u003e\n\u003c/ReactDeleteRow\u003e\n```\n\n### Example with onDeleteComplete\n\n```js\n\u003cReactDeleteRow\n  ...\n  onDelete={ item =\u003e { if (window.confirm(`Are you sure you want to delete the item \"${item.title}\"?`)) {\n    this.onDelete(item.id);\n    return true;\n  }}}\n  onDeleteComplete={ item =\u003e\n    // Remove item from state after row fades out.\n    this.setState(prevState =\u003e ({\n      items: prevState.items.filter(i =\u003e i.id !== item.id)\n    }))\n  }\u003e\n  ...\n\u003c/ReactDeleteRow\u003e\n```\n\n## Building the Library\n\nTo build the npm module, follow the steps below.\n\n1. Clone the [repository](https://github.com/primaryobjects/react-delete-row).\n2. Open a terminal and navigate to the root folder.\n3. Run the command `npm install`.\n4. Run the command `npm pack` to test the tarball for the npm publish.\n\n*The contents from `npm pack` will include the `/dist` and `/src` folders, along with a package.json containing a `main` pointer to the file `/dist/index.js`.*\n\n*You can also manually run the command `npm run prepare` to create a new build.*\n\n## Running the Example\n\nTo run the example, follow the steps below.\n\n1. Clone the [repository](https://github.com/primaryobjects/react-delete-row).\n2. Open a terminal and navigate to the folder `test`.\n3. Run the command `npm install`.\n4. Run the command `npm start`.\n\n## Notes\n\nThe component uses the CSS class `fade` to fade out the table row upon clicking. This can be overridden in your CSS to customize the animation effect.\n\n```css\n.fade {\n    opacity: 0;\n    transition: opacity 500ms;\n}\n```\n\n## License\n\nMIT\n\n## Author\n\nKory Becker http://www.primaryobjects.com/kory-becker\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimaryobjects%2Freact-delete-row","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprimaryobjects%2Freact-delete-row","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimaryobjects%2Freact-delete-row/lists"}