{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/16975","repository_url":"https://api.github.com/repos/emberjs/ember.js","labels_url":"https://api.github.com/repos/emberjs/ember.js/issues/16975/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/ember.js/issues/16975/comments","events_url":"https://api.github.com/repos/emberjs/ember.js/issues/16975/events","html_url":"https://github.com/emberjs/ember.js/issues/16975","id":360186346,"node_id":"MDU6SXNzdWUzNjAxODYzNDY=","number":16975,"title":"#each re-render bug","user":{"login":"andrewtimberlake","id":39077,"node_id":"MDQ6VXNlcjM5MDc3","avatar_url":"https://avatars0.githubusercontent.com/u/39077?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewtimberlake","html_url":"https://github.com/andrewtimberlake","followers_url":"https://api.github.com/users/andrewtimberlake/followers","following_url":"https://api.github.com/users/andrewtimberlake/following{/other_user}","gists_url":"https://api.github.com/users/andrewtimberlake/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewtimberlake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewtimberlake/subscriptions","organizations_url":"https://api.github.com/users/andrewtimberlake/orgs","repos_url":"https://api.github.com/users/andrewtimberlake/repos","events_url":"https://api.github.com/users/andrewtimberlake/events{/privacy}","received_events_url":"https://api.github.com/users/andrewtimberlake/received_events","type":"User","site_admin":false},"labels":[{"id":360697975,"node_id":"MDU6TGFiZWwzNjA2OTc5NzU=","url":"https://api.github.com/repos/emberjs/ember.js/labels/Has%20Reproduction","name":"Has Reproduction","color":"b60205","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-14T07:23:17Z","updated_at":"2018-10-12T18:04:17Z","closed_at":null,"author_association":"NONE","body":"I have an array of true/false/undefined values which I am rendering as a list of checkboxes.\r\nWhen changing an array element to or from true, the list of checkboxes is re-rendered with the following (index+1) checkbox inheriting the change along with the changed checkbox.\r\nCode:\r\n```handlebars\r\n{{#each range as |value idx|}}\r\n  <label><input type=\"checkbox\" checked={{value}} {{action makeChange idx on=\"change\"}}>{{idx}}: {{value}}</label><br/>\r\n{{/each}}\r\n```\r\nWhen I use `{{#each range key=\"@index\" as |value idx|}}` it works correctly.\r\n\r\nTwiddle: https://ember-twiddle.com/6d63548f35f99da19cee9f58fb64db59\r\n\r\n![embereach](https://user-images.githubusercontent.com/39077/45535619-668f2200-b7ff-11e8-9c54-cde8d1b4a8fa.gif)\r\n"},"comment":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/comments/429411003","html_url":"https://github.com/emberjs/ember.js/issues/16975#issuecomment-429411003","issue_url":"https://api.github.com/repos/emberjs/ember.js/issues/16975","id":429411003,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTQxMTAwMw==","user":{"login":"pixelhandler","id":17178,"node_id":"MDQ6VXNlcjE3MTc4","avatar_url":"https://avatars1.githubusercontent.com/u/17178?v=4","gravatar_id":"","url":"https://api.github.com/users/pixelhandler","html_url":"https://github.com/pixelhandler","followers_url":"https://api.github.com/users/pixelhandler/followers","following_url":"https://api.github.com/users/pixelhandler/following{/other_user}","gists_url":"https://api.github.com/users/pixelhandler/gists{/gist_id}","starred_url":"https://api.github.com/users/pixelhandler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixelhandler/subscriptions","organizations_url":"https://api.github.com/users/pixelhandler/orgs","repos_url":"https://api.github.com/users/pixelhandler/repos","events_url":"https://api.github.com/users/pixelhandler/events{/privacy}","received_events_url":"https://api.github.com/users/pixelhandler/received_events","type":"User","site_admin":false},"created_at":"2018-10-12T18:04:17Z","updated_at":"2018-10-12T18:04:17Z","author_association":"CONTRIBUTOR","body":"@andrewtimberlake seems like using the `{{#each range key=\"@index\" as |value idx|}}` does workaround the issue.\r\n\r\nBut does seem like a bug, the `key` is for a different purpose, https://www.emberjs.com/api/ember/release/classes/Ember.Templates.helpers/methods/if?anchor=each"}}
{"actor":{"display_login":"pixelhandler"}}