{"action":"created","issue":{"url":"https://api.github.com/repos/canjs/canjs/issues/1762","labels_url":"https://api.github.com/repos/canjs/canjs/issues/1762/labels{/name}","comments_url":"https://api.github.com/repos/canjs/canjs/issues/1762/comments","events_url":"https://api.github.com/repos/canjs/canjs/issues/1762/events","html_url":"https://github.com/canjs/canjs/issues/1762","id":90173770,"number":1762,"title":"Dynamic select menus don't live bind correctly","user":{"login":"dylanrtt","id":11302736,"avatar_url":"https://avatars.githubusercontent.com/u/11302736?v=3","gravatar_id":"","url":"https://api.github.com/users/dylanrtt","html_url":"https://github.com/dylanrtt","followers_url":"https://api.github.com/users/dylanrtt/followers","following_url":"https://api.github.com/users/dylanrtt/following{/other_user}","gists_url":"https://api.github.com/users/dylanrtt/gists{/gist_id}","starred_url":"https://api.github.com/users/dylanrtt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylanrtt/subscriptions","organizations_url":"https://api.github.com/users/dylanrtt/orgs","repos_url":"https://api.github.com/users/dylanrtt/repos","events_url":"https://api.github.com/users/dylanrtt/events{/privacy}","received_events_url":"https://api.github.com/users/dylanrtt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/canjs/canjs/labels/Bug","name":"Bug","color":"e10c02"}],"state":"open","locked":false,"assignee":{"login":"justinbmeyer","id":78602,"avatar_url":"https://avatars.githubusercontent.com/u/78602?v=3","gravatar_id":"","url":"https://api.github.com/users/justinbmeyer","html_url":"https://github.com/justinbmeyer","followers_url":"https://api.github.com/users/justinbmeyer/followers","following_url":"https://api.github.com/users/justinbmeyer/following{/other_user}","gists_url":"https://api.github.com/users/justinbmeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/justinbmeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinbmeyer/subscriptions","organizations_url":"https://api.github.com/users/justinbmeyer/orgs","repos_url":"https://api.github.com/users/justinbmeyer/repos","events_url":"https://api.github.com/users/justinbmeyer/events{/privacy}","received_events_url":"https://api.github.com/users/justinbmeyer/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/canjs/canjs/milestones/42","html_url":"https://github.com/canjs/canjs/milestones/2.3.8","labels_url":"https://api.github.com/repos/canjs/canjs/milestones/42/labels","id":1462503,"number":42,"title":"2.3.8","description":"","creator":{"login":"justinbmeyer","id":78602,"avatar_url":"https://avatars.githubusercontent.com/u/78602?v=3","gravatar_id":"","url":"https://api.github.com/users/justinbmeyer","html_url":"https://github.com/justinbmeyer","followers_url":"https://api.github.com/users/justinbmeyer/followers","following_url":"https://api.github.com/users/justinbmeyer/following{/other_user}","gists_url":"https://api.github.com/users/justinbmeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/justinbmeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinbmeyer/subscriptions","organizations_url":"https://api.github.com/users/justinbmeyer/orgs","repos_url":"https://api.github.com/users/justinbmeyer/repos","events_url":"https://api.github.com/users/justinbmeyer/events{/privacy}","received_events_url":"https://api.github.com/users/justinbmeyer/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":1,"state":"open","created_at":"2015-12-16T02:30:49Z","updated_at":"2015-12-23T00:15:40Z","due_on":"2015-12-31T06:00:00Z","closed_at":null},"comments":14,"created_at":"2015-06-22T18:27:25Z","updated_at":"2015-12-23T23:18:09Z","closed_at":null,"body":"When creating a dynamic select menu with a stache ```#each``` such as in the following example, when the result of the rendered list changes, the selected value of the select menu changes to the first item, which isn't necessarily correct.\r\n\r\n```html\r\n<select can-value=\"{selectedOpt}\">\r\n  <option></option>\r\n  {{#each opts}}\r\n    <option name=\"{{name}}\">{{name}}</option>\r\n  {{/each}}\r\n</select>\r\n```\r\n\r\nhttp://jsbin.com/fedixolaru/1/edit?html,js,output\r\n\r\nThis can occur when using a computed list or when using stache filtering."},"comment":{"url":"https://api.github.com/repos/canjs/canjs/issues/comments/167007550","html_url":"https://github.com/canjs/canjs/issues/1762#issuecomment-167007550","issue_url":"https://api.github.com/repos/canjs/canjs/issues/1762","id":167007550,"user":{"login":"justinbmeyer","id":78602,"avatar_url":"https://avatars.githubusercontent.com/u/78602?v=3","gravatar_id":"","url":"https://api.github.com/users/justinbmeyer","html_url":"https://github.com/justinbmeyer","followers_url":"https://api.github.com/users/justinbmeyer/followers","following_url":"https://api.github.com/users/justinbmeyer/following{/other_user}","gists_url":"https://api.github.com/users/justinbmeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/justinbmeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinbmeyer/subscriptions","organizations_url":"https://api.github.com/users/justinbmeyer/orgs","repos_url":"https://api.github.com/users/justinbmeyer/repos","events_url":"https://api.github.com/users/justinbmeyer/events{/privacy}","received_events_url":"https://api.github.com/users/justinbmeyer/received_events","type":"User","site_admin":false},"created_at":"2015-12-23T23:18:09Z","updated_at":"2015-12-23T23:18:09Z","body":"> Your suggested 2-way binding behavior might be the best option, but what should happen during initialization if the bound value is not present in the options?\r\n\r\nIn this case, if the parent scope has a value, say \"foo\", the parent value would remain.  \r\n\r\n> Might that cause the selected value to change to \"\" unexpectedly or would batching likely prevent that?\r\n\r\nIt might, but hopefully batching would prevent that."}}