Guest User

Untitled

a guest
May 22nd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. toggleItemEditing = index => {
  2. this.setState({
  3. items: this.state.items.map((item, itemIndex) => {
  4. if (itemIndex === index) {
  5. return {
  6. ...item,
  7. isEditing: !item.isEditing
  8. }
  9. }
  10. return item;
  11. })
  12. });
  13. };
Add Comment
Please, Sign In to add comment