{"id":17022724,"url":"https://github.com/arpitbatra123/react-list-editable","last_synced_at":"2025-03-22T17:31:02.318Z","repository":{"id":42986057,"uuid":"208409393","full_name":"arpitbatra123/react-list-editable","owner":"arpitbatra123","description":"A React component to render editable lists","archived":false,"fork":false,"pushed_at":"2023-01-06T02:10:26.000Z","size":2485,"stargazers_count":3,"open_issues_count":31,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T07:44:31.077Z","etag":null,"topics":["component","netlify","parcel","react","webpack"],"latest_commit_sha":null,"homepage":"https://react-list-editable.netlify.com","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/arpitbatra123.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":"2019-09-14T08:08:13.000Z","updated_at":"2021-08-27T00:03:37.000Z","dependencies_parsed_at":"2023-02-05T02:31:05.127Z","dependency_job_id":null,"html_url":"https://github.com/arpitbatra123/react-list-editable","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/arpitbatra123%2Freact-list-editable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arpitbatra123%2Freact-list-editable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arpitbatra123%2Freact-list-editable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arpitbatra123%2Freact-list-editable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arpitbatra123","download_url":"https://codeload.github.com/arpitbatra123/react-list-editable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244994932,"owners_count":20544246,"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":["component","netlify","parcel","react","webpack"],"created_at":"2024-10-14T07:11:05.773Z","updated_at":"2025-03-22T17:31:01.962Z","avatar_url":"https://github.com/arpitbatra123.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Netlify Status](https://api.netlify.com/api/v1/badges/c17e1d8c-c9bf-470e-98d0-5253ed2d7cf6/deploy-status)](https://app.netlify.com/sites/react-list-editable/deploys)\n\n# react-list-editable\n\nA [React](https://reactjs.org) component to render editable lists\n\n## \u003cu\u003eInstallation and Usage\u003c/u\u003e\n\nThe easiest way to use react-list-editable is to install it from npm and build it into your app with Webpack.\n\n```shell\nnpm i react-list-editable\n```\n\nThe use it in your app:\n\nImport this component in your app using :\n\n```js\nimport EditableList from 'react-list-editable';\n```\n\nDon't forget to import the styles as well: ⚠️\n\n```js\nimport 'react-list-editable/lib/react-list-editable.css';\n```\n\nSee below for an extended example: \n\n```js\nimport React, { Component } from 'react';\n\nimport EditableList from 'react-list-editable';\nimport 'react-list-editable/lib/react-list-editable.css';\n\nexport default class Example extends Component {\n  constructor(props) {\n    super(props);\n    this.state = {\n      list: ['🥳 Partying', '👩🏻‍🎨 Painting', '🛌🏻 Sleeping']\n    };\n  }\n  \n  onListChange(newList) {\n    this.setState({\n      list: newList\n    });\n  }\n  \n  render() {\n    return (\n      \u003cdiv className='app-container'\u003e\n        \u003cEditableList\n          list={this.state.list}\n          onListChange={this.onListChange.bind(this)}\n          placeholder='Enter a value'\n        /\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n\n```\n\n\n\n## \u003cu\u003eProps\u003c/u\u003e\n\nYou have to pass the following props to this component:\n\n- `list` -  The list of elements to edit. This is a required prop, otherwise what will you edit in the editable list ? 🤷🏻‍♂️\n- `onListChange` - A function which, on any updation of the list , will recieve the updated list as an argument.\n- `placeholder` - The placeholder to show in the field for adding a new element to a list.\n\n## \u003cu\u003eDemo\u003c/u\u003e\n\nYou can see this component in action [here](https://react-list-editable.netlify.com/). The code for this demo can be found in the `demo` folder of this repository.\n\n## \u003cu\u003eCodesandbox\u003c/u\u003e\n\n[![Edit react-list-editable-demo](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/react-list-editable-demo-lk5fl?fontsize=14\u0026hidenavigation=1\u0026theme=dark)\n\n## \u003cu\u003eThanks\u003c/u\u003e\n\n- Contributions are welcome \n- Questions? Ask away [@arpitbatra123](https://twitter.com/arpitbatra123) on twitter.\n- The component is built using webpack, the demo using parcel and is hosted on Netlify. A big :heart: to these projects\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farpitbatra123%2Freact-list-editable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farpitbatra123%2Freact-list-editable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farpitbatra123%2Freact-list-editable/lists"}