{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/12520","labels_url":"https://api.github.com/repos/emberjs/ember.js/issues/12520/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/ember.js/issues/12520/comments","events_url":"https://api.github.com/repos/emberjs/ember.js/issues/12520/events","html_url":"https://github.com/emberjs/ember.js/issues/12520","id":113193871,"number":12520,"title":"Action helper argument placeholders?","user":{"login":"alexander-alvarez","id":11779993,"avatar_url":"https://avatars.githubusercontent.com/u/11779993?v=3","gravatar_id":"","url":"https://api.github.com/users/alexander-alvarez","html_url":"https://github.com/alexander-alvarez","followers_url":"https://api.github.com/users/alexander-alvarez/followers","following_url":"https://api.github.com/users/alexander-alvarez/following{/other_user}","gists_url":"https://api.github.com/users/alexander-alvarez/gists{/gist_id}","starred_url":"https://api.github.com/users/alexander-alvarez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexander-alvarez/subscriptions","organizations_url":"https://api.github.com/users/alexander-alvarez/orgs","repos_url":"https://api.github.com/users/alexander-alvarez/repos","events_url":"https://api.github.com/users/alexander-alvarez/events{/privacy}","received_events_url":"https://api.github.com/users/alexander-alvarez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-24T23:39:27Z","updated_at":"2015-11-06T18:12:07Z","closed_at":null,"body":"Currently in Ember 1.13\r\n\r\nI have a simple component that has grid-like functionality\r\n```\r\n{{#each rows as |row i|}}\r\n   {{my-row-component\r\n      someAction=(action 'selectRow' i value=\"target.attributes['col-num'].value\")\r\n   }}\r\n{{/each}}\r\n// my-row-component.js\r\n...\r\n click: (event)->\r\n     this.attrs.someAction(event)\r\n```\r\n**What happens:**\r\n`i` becomes the first argument to the action callback and the `value` by default reads from first argument, which in this case is the i instead of the jquery event, in which case my arguments to  `selectRow` are `(undefined, jQuery.Event)`\r\n\r\n**What I have to do:**\r\nTo fix this I have to bypass the neatness of the value setting, and modify the click code.\r\n```\r\n click: (event)->\r\n     this.attrs.someAction(event.target.attributes['col-num'].value)\r\n```\r\n\r\n**It would be neat to be able to do:**\r\n```\r\nsomeAction=(action 'selectRow' _ i value=\"target.attributes['col-num'].value\" )\r\n```\r\n\r\nThis would also be quite powerful with currying etc, and also give you flexibility  if you are using someone else's API you can't control.\r\n\r\nIs this far-fetched?"},"comment":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/comments/154489342","html_url":"https://github.com/emberjs/ember.js/issues/12520#issuecomment-154489342","issue_url":"https://api.github.com/repos/emberjs/ember.js/issues/12520","id":154489342,"user":{"login":"pixelhandler","id":17178,"avatar_url":"https://avatars.githubusercontent.com/u/17178?v=3","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":"2015-11-06T18:12:07Z","updated_at":"2015-11-06T18:12:07Z","body":"@alexander-alvarez This sounds like a feature request, see https://github.com/emberjs/ember.js/blob/master/CONTRIBUTING.md#requesting-a-feature \r\n\r\n> Use RFC issues to propose a rough idea, basically a great place to test the waters."}}