{"action":"created","issue":{"url":"https://api.github.com/repos/cibernox/ember-power-select/issues/223","labels_url":"https://api.github.com/repos/cibernox/ember-power-select/issues/223/labels{/name}","comments_url":"https://api.github.com/repos/cibernox/ember-power-select/issues/223/comments","events_url":"https://api.github.com/repos/cibernox/ember-power-select/issues/223/events","html_url":"https://github.com/cibernox/ember-power-select/issues/223","id":124414599,"number":223,"title":"Alternative to creating entire component for a simple template","user":{"login":"cah-briangantzler","id":1529286,"avatar_url":"https://avatars.githubusercontent.com/u/1529286?v=3","gravatar_id":"","url":"https://api.github.com/users/cah-briangantzler","html_url":"https://github.com/cah-briangantzler","followers_url":"https://api.github.com/users/cah-briangantzler/followers","following_url":"https://api.github.com/users/cah-briangantzler/following{/other_user}","gists_url":"https://api.github.com/users/cah-briangantzler/gists{/gist_id}","starred_url":"https://api.github.com/users/cah-briangantzler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cah-briangantzler/subscriptions","organizations_url":"https://api.github.com/users/cah-briangantzler/orgs","repos_url":"https://api.github.com/users/cah-briangantzler/repos","events_url":"https://api.github.com/users/cah-briangantzler/events{/privacy}","received_events_url":"https://api.github.com/users/cah-briangantzler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-30T23:39:10Z","updated_at":"2016-01-04T21:38:17Z","closed_at":null,"body":"Hate having to create an entire component just for the template {{selected.fullName}}.\r\nAs a suggestion, changing the yield to include a section param would allow for the following (only relevant parts included)\r\n\r\n{{#power-select as | section, option, term |}}\r\n    {{#if (eq section \"option\") }}\r\n         {{option.fullNameWithMrn}}\r\n    {{else if (eq section  \"selected\") }}\r\n         {{option.fullName}}\r\n    {{/if}}\r\n{{/power-select}}\r\n\r\nsince your already using truth helpers. Would allow for the before and after option as well. While the yield to inverse is nice, ember failed when you cant pass params meaning you cant do something like \"No options match {{term}}\", the above approach could also replace inverse as well.\r\n\r\nPlacing section first makes the most sense although last would make it more backward compatible, although currently you are passing term as a second yield param, but the docs dont really show it so not sure how many people are using it. \r\n\r\nCould also change the yield to yield a hash, allowing for the name option when its a list option template, and selected when its the selected template. Would also leave room for adding more params in the future without breaking backward compatibility. \r\n\r\nI know it isn't very backward compatible, but its a suggestion. If the dev needs a the power of a component, they still have that option by placing {{my-comp}} in the if."},"comment":{"url":"https://api.github.com/repos/cibernox/ember-power-select/issues/comments/168817682","html_url":"https://github.com/cibernox/ember-power-select/issues/223#issuecomment-168817682","issue_url":"https://api.github.com/repos/cibernox/ember-power-select/issues/223","id":168817682,"user":{"login":"cibernox","id":265339,"avatar_url":"https://avatars.githubusercontent.com/u/265339?v=3","gravatar_id":"","url":"https://api.github.com/users/cibernox","html_url":"https://github.com/cibernox","followers_url":"https://api.github.com/users/cibernox/followers","following_url":"https://api.github.com/users/cibernox/following{/other_user}","gists_url":"https://api.github.com/users/cibernox/gists{/gist_id}","starred_url":"https://api.github.com/users/cibernox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cibernox/subscriptions","organizations_url":"https://api.github.com/users/cibernox/orgs","repos_url":"https://api.github.com/users/cibernox/repos","events_url":"https://api.github.com/users/cibernox/events{/privacy}","received_events_url":"https://api.github.com/users/cibernox/received_events","type":"User","site_admin":false},"created_at":"2016-01-04T21:38:17Z","updated_at":"2016-01-04T21:38:17Z","body":"Wouldn't your suggestion in #222 solve the same issue? I thought about passing the \"section\" to the block but I was reluctact because if means that you will perform on extra `if` + `eq` invocation for each element of the list.\r\n\r\nBesides, I've also been holding that because there is some RFCs for allowing multiple blocks in components without this hack, although I haven't heard of any progress on that."}}