{"action":"created","issue":{"url":"https://api.github.com/repos/cibernox/ember-power-select/issues/962","repository_url":"https://api.github.com/repos/cibernox/ember-power-select","labels_url":"https://api.github.com/repos/cibernox/ember-power-select/issues/962/labels{/name}","comments_url":"https://api.github.com/repos/cibernox/ember-power-select/issues/962/comments","events_url":"https://api.github.com/repos/cibernox/ember-power-select/issues/962/events","html_url":"https://github.com/cibernox/ember-power-select/issues/962","id":249166650,"number":962,"title":"Nothing is Displayed When the value of the selected Object is 0","user":{"login":"batosi175","id":9507793,"avatar_url":"https://avatars1.githubusercontent.com/u/9507793?v=4","gravatar_id":"","url":"https://api.github.com/users/batosi175","html_url":"https://github.com/batosi175","followers_url":"https://api.github.com/users/batosi175/followers","following_url":"https://api.github.com/users/batosi175/following{/other_user}","gists_url":"https://api.github.com/users/batosi175/gists{/gist_id}","starred_url":"https://api.github.com/users/batosi175/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/batosi175/subscriptions","organizations_url":"https://api.github.com/users/batosi175/orgs","repos_url":"https://api.github.com/users/batosi175/repos","events_url":"https://api.github.com/users/batosi175/events{/privacy}","received_events_url":"https://api.github.com/users/batosi175/received_events","type":"User","site_admin":false},"labels":[{"id":265338534,"url":"https://api.github.com/repos/cibernox/ember-power-select/labels/bug","name":"bug","color":"fc2929","default":true},{"id":265338537,"url":"https://api.github.com/repos/cibernox/ember-power-select/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-08-09T21:24:58Z","updated_at":"2017-11-23T15:32:43Z","closed_at":"2017-11-23T15:32:22Z","author_association":"NONE","body":"I happen to be using power select with some enumerators that include flags that have values: [0,1,2]\r\nbut if the value of 0 happens to be selected then nothing is shown in the selected field even if the option is visible in the dropdown. \r\n\r\nI assume this is due to the way that the ember-power-select-true-string-if-present.js helper does it's evaluations. \r\n```\r\n\r\nimport { helper } from '@ember/component/helper';\r\n\r\nexport function emberPowerSelectTrueStringIfPresent([bool]/* , hash*/) {\r\n  return bool ? 'true' : false;\r\n}\r\n\r\nexport default helper(emberPowerSelectTrueStringIfPresent);\r\n```\r\n\r\n\r\nMy Code: \r\n\r\ncontroller.js\r\n```\r\nexport default Ember.Controller.extend({\r\n  aaa: [-3,-2,-1,0,1,2,3,4],\r\n  aa: 0,\r\n)}\r\n```\r\n\r\nindex.hbs\r\n```\r\n{{#power-select\r\n  searchEnabled=false\r\n  selected=aa\r\n  options=aaa\r\n  onchange=(action (mut aa))\r\n  as |name|\r\n}}\r\n  {{name}}\r\n{{/power-select}}\r\n```\r\n\r\nhere is what the dropdown with a set of numbers looks like\r\n![image](https://user-images.githubusercontent.com/9507793/29144384-66ed9b18-7d1e-11e7-8f08-1f4a836794c8.png)\r\n\r\nif any number but 0 get selected it will render normally. \r\n![image](https://user-images.githubusercontent.com/9507793/29144442-a588ad86-7d1e-11e7-8371-d5bf11f80820.png)\r\n\r\nif the number selected happens to be 0 then renders nothing in the selection box\r\n![image](https://user-images.githubusercontent.com/9507793/29144395-716b7c22-7d1e-11e7-83f3-c15866582fe3.png)\r\n\r\nPossibly using an Ember.IsNone evaluation instead would allow for things like 0 to render still. Guess its just a side effect of having a truthy evaluation. "},"comment":{"url":"https://api.github.com/repos/cibernox/ember-power-select/issues/comments/346647588","html_url":"https://github.com/cibernox/ember-power-select/issues/962#issuecomment-346647588","issue_url":"https://api.github.com/repos/cibernox/ember-power-select/issues/962","id":346647588,"user":{"login":"cibernox","id":265339,"avatar_url":"https://avatars2.githubusercontent.com/u/265339?v=4","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":"2017-11-23T15:32:43Z","updated_at":"2017-11-23T15:32:43Z","author_association":"OWNER","body":"I decided not to fix this for now."}}
{"actor":{"display_login":"cibernox"}}