{"action":"created","issue":{"url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/285","repository_url":"https://api.github.com/repos/ga-wdi-exercises/project4","labels_url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/285/labels{/name}","comments_url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/285/comments","events_url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/285/events","html_url":"https://github.com/ga-wdi-exercises/project4/issues/285","id":170655089,"number":285,"title":"New item delete button ID is not working","user":{"login":"SeanTay","id":6488375,"avatar_url":"https://avatars.githubusercontent.com/u/6488375?v=3","gravatar_id":"","url":"https://api.github.com/users/SeanTay","html_url":"https://github.com/SeanTay","followers_url":"https://api.github.com/users/SeanTay/followers","following_url":"https://api.github.com/users/SeanTay/following{/other_user}","gists_url":"https://api.github.com/users/SeanTay/gists{/gist_id}","starred_url":"https://api.github.com/users/SeanTay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeanTay/subscriptions","organizations_url":"https://api.github.com/users/SeanTay/orgs","repos_url":"https://api.github.com/users/SeanTay/repos","events_url":"https://api.github.com/users/SeanTay/events{/privacy}","received_events_url":"https://api.github.com/users/SeanTay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-11T14:10:09Z","updated_at":"2016-08-11T14:48:49Z","closed_at":null,"body":"When we create a new item, the delete button is also created but not working (the id is not saved) unless the page is refreshed. The button might be getting created at the same time or before it's being saved to the database. \r\n\r\nPlease help!!! =("},"comment":{"url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/comments/239184233","html_url":"https://github.com/ga-wdi-exercises/project4/issues/285#issuecomment-239184233","issue_url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/285","id":239184233,"user":{"login":"SeanTay","id":6488375,"avatar_url":"https://avatars.githubusercontent.com/u/6488375?v=3","gravatar_id":"","url":"https://api.github.com/users/SeanTay","html_url":"https://github.com/SeanTay","followers_url":"https://api.github.com/users/SeanTay/followers","following_url":"https://api.github.com/users/SeanTay/following{/other_user}","gists_url":"https://api.github.com/users/SeanTay/gists{/gist_id}","starred_url":"https://api.github.com/users/SeanTay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeanTay/subscriptions","organizations_url":"https://api.github.com/users/SeanTay/orgs","repos_url":"https://api.github.com/users/SeanTay/repos","events_url":"https://api.github.com/users/SeanTay/events{/privacy}","received_events_url":"https://api.github.com/users/SeanTay/received_events","type":"User","site_admin":false},"created_at":"2016-08-11T14:48:49Z","updated_at":"2016-08-11T14:48:49Z","body":"```\r\nhandleDeleteTodo(e, id){\r\n  let component = this\r\n  e.preventDefault()\r\n  console.log('delete todo item clicked')\r\n  $.ajax({\r\n    url: '/api/todos/' + id,\r\n    type: 'DELETE',\r\n    success: () => {\r\n\r\n      console.log('successfully deleting backend')\r\n      newTodos = component.state.savedTodos.filter((todo) => {\r\n        return todo.id != id;\r\n      });\r\n      component.setState({savedTodos: newTodos})\r\n    },\r\n    fail: () => {\r\n      console.log('failed')\r\n    }\r\n  })\r\n}\r\n```\r\n\r\nconsole.log (failed) is not showing up. "}}
{"actor":{"display_login":"SeanTay"}}