Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- toggleItemEditing = index => {
- this.setState({
- items: this.state.items.map((item, itemIndex) => {
- if (itemIndex === index) {
- return {
- ...item,
- isEditing: !item.isEditing
- }
- }
- return item;
- })
- });
- };
Add Comment
Please, Sign In to add comment