{"action":"closed","number":27,"pull_request":{"url":"https://api.github.com/repos/kartik-v/dependent-dropdown/pulls/27","id":38774249,"html_url":"https://github.com/kartik-v/dependent-dropdown/pull/27","diff_url":"https://github.com/kartik-v/dependent-dropdown/pull/27.diff","patch_url":"https://github.com/kartik-v/dependent-dropdown/pull/27.patch","issue_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/issues/27","number":27,"state":"closed","locked":false,"title":"Don't force dropdown value","user":{"login":"Insensus","id":10449939,"avatar_url":"https://avatars.githubusercontent.com/u/10449939?v=3","gravatar_id":"","url":"https://api.github.com/users/Insensus","html_url":"https://github.com/Insensus","followers_url":"https://api.github.com/users/Insensus/followers","following_url":"https://api.github.com/users/Insensus/following{/other_user}","gists_url":"https://api.github.com/users/Insensus/gists{/gist_id}","starred_url":"https://api.github.com/users/Insensus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Insensus/subscriptions","organizations_url":"https://api.github.com/users/Insensus/orgs","repos_url":"https://api.github.com/users/Insensus/repos","events_url":"https://api.github.com/users/Insensus/events{/privacy}","received_events_url":"https://api.github.com/users/Insensus/received_events","type":"User","site_admin":false},"body":"I found that, when the options of a dropdown were updated, the selected value would persist even if it didn't exist among the new options.\r\nThis would lead to an empty, non-existent option being selected whereas I would expect the placeholder (or the first element if no placeholder exists) to be selected.\r\n\r\nSetting the dropdown value with .val() on line 128 doesn't seem to be necessary if the returned option values are first converted to strings on line 18. This ensures that when the AJAX-call returns numeric values, they can still match the previous value, which is always a string.","created_at":"2015-06-29T13:39:27Z","updated_at":"2015-07-14T07:03:37Z","closed_at":"2015-07-14T07:03:37Z","merged_at":null,"merge_commit_sha":"624ce9ad8856905818d3dbd27e719afc65d50ac0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/pulls/27/commits","review_comments_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/pulls/27/comments","review_comment_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/issues/27/comments","statuses_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/statuses/6110db177b432cc25e10f8265f8fabce27967259","head":{"label":"Insensus:dont-force-dropdown-value","ref":"dont-force-dropdown-value","sha":"6110db177b432cc25e10f8265f8fabce27967259","user":{"login":"Insensus","id":10449939,"avatar_url":"https://avatars.githubusercontent.com/u/10449939?v=3","gravatar_id":"","url":"https://api.github.com/users/Insensus","html_url":"https://github.com/Insensus","followers_url":"https://api.github.com/users/Insensus/followers","following_url":"https://api.github.com/users/Insensus/following{/other_user}","gists_url":"https://api.github.com/users/Insensus/gists{/gist_id}","starred_url":"https://api.github.com/users/Insensus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Insensus/subscriptions","organizations_url":"https://api.github.com/users/Insensus/orgs","repos_url":"https://api.github.com/users/Insensus/repos","events_url":"https://api.github.com/users/Insensus/events{/privacy}","received_events_url":"https://api.github.com/users/Insensus/received_events","type":"User","site_admin":false},"repo":{"id":38246732,"name":"dependent-dropdown","full_name":"Insensus/dependent-dropdown","owner":{"login":"Insensus","id":10449939,"avatar_url":"https://avatars.githubusercontent.com/u/10449939?v=3","gravatar_id":"","url":"https://api.github.com/users/Insensus","html_url":"https://github.com/Insensus","followers_url":"https://api.github.com/users/Insensus/followers","following_url":"https://api.github.com/users/Insensus/following{/other_user}","gists_url":"https://api.github.com/users/Insensus/gists{/gist_id}","starred_url":"https://api.github.com/users/Insensus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Insensus/subscriptions","organizations_url":"https://api.github.com/users/Insensus/orgs","repos_url":"https://api.github.com/users/Insensus/repos","events_url":"https://api.github.com/users/Insensus/events{/privacy}","received_events_url":"https://api.github.com/users/Insensus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Insensus/dependent-dropdown","description":"JQuery plugin that enables to add and control multi level dependent dropdown lists.","fork":true,"url":"https://api.github.com/repos/Insensus/dependent-dropdown","forks_url":"https://api.github.com/repos/Insensus/dependent-dropdown/forks","keys_url":"https://api.github.com/repos/Insensus/dependent-dropdown/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Insensus/dependent-dropdown/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Insensus/dependent-dropdown/teams","hooks_url":"https://api.github.com/repos/Insensus/dependent-dropdown/hooks","issue_events_url":"https://api.github.com/repos/Insensus/dependent-dropdown/issues/events{/number}","events_url":"https://api.github.com/repos/Insensus/dependent-dropdown/events","assignees_url":"https://api.github.com/repos/Insensus/dependent-dropdown/assignees{/user}","branches_url":"https://api.github.com/repos/Insensus/dependent-dropdown/branches{/branch}","tags_url":"https://api.github.com/repos/Insensus/dependent-dropdown/tags","blobs_url":"https://api.github.com/repos/Insensus/dependent-dropdown/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Insensus/dependent-dropdown/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Insensus/dependent-dropdown/git/refs{/sha}","trees_url":"https://api.github.com/repos/Insensus/dependent-dropdown/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Insensus/dependent-dropdown/statuses/{sha}","languages_url":"https://api.github.com/repos/Insensus/dependent-dropdown/languages","stargazers_url":"https://api.github.com/repos/Insensus/dependent-dropdown/stargazers","contributors_url":"https://api.github.com/repos/Insensus/dependent-dropdown/contributors","subscribers_url":"https://api.github.com/repos/Insensus/dependent-dropdown/subscribers","subscription_url":"https://api.github.com/repos/Insensus/dependent-dropdown/subscription","commits_url":"https://api.github.com/repos/Insensus/dependent-dropdown/commits{/sha}","git_commits_url":"https://api.github.com/repos/Insensus/dependent-dropdown/git/commits{/sha}","comments_url":"https://api.github.com/repos/Insensus/dependent-dropdown/comments{/number}","issue_comment_url":"https://api.github.com/repos/Insensus/dependent-dropdown/issues/comments{/number}","contents_url":"https://api.github.com/repos/Insensus/dependent-dropdown/contents/{+path}","compare_url":"https://api.github.com/repos/Insensus/dependent-dropdown/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Insensus/dependent-dropdown/merges","archive_url":"https://api.github.com/repos/Insensus/dependent-dropdown/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Insensus/dependent-dropdown/downloads","issues_url":"https://api.github.com/repos/Insensus/dependent-dropdown/issues{/number}","pulls_url":"https://api.github.com/repos/Insensus/dependent-dropdown/pulls{/number}","milestones_url":"https://api.github.com/repos/Insensus/dependent-dropdown/milestones{/number}","notifications_url":"https://api.github.com/repos/Insensus/dependent-dropdown/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Insensus/dependent-dropdown/labels{/name}","releases_url":"https://api.github.com/repos/Insensus/dependent-dropdown/releases{/id}","created_at":"2015-06-29T12:34:19Z","updated_at":"2015-06-29T12:34:19Z","pushed_at":"2015-06-29T13:32:03Z","git_url":"git://github.com/Insensus/dependent-dropdown.git","ssh_url":"git@github.com:Insensus/dependent-dropdown.git","clone_url":"https://github.com/Insensus/dependent-dropdown.git","svn_url":"https://github.com/Insensus/dependent-dropdown","homepage":"http://plugins.krajee.com/dependent-dropdown","size":164,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kartik-v:master","ref":"master","sha":"76a4e23161655c8bfb7c0f1c024b5a934de1bba8","user":{"login":"kartik-v","id":3592619,"avatar_url":"https://avatars.githubusercontent.com/u/3592619?v=3","gravatar_id":"","url":"https://api.github.com/users/kartik-v","html_url":"https://github.com/kartik-v","followers_url":"https://api.github.com/users/kartik-v/followers","following_url":"https://api.github.com/users/kartik-v/following{/other_user}","gists_url":"https://api.github.com/users/kartik-v/gists{/gist_id}","starred_url":"https://api.github.com/users/kartik-v/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kartik-v/subscriptions","organizations_url":"https://api.github.com/users/kartik-v/orgs","repos_url":"https://api.github.com/users/kartik-v/repos","events_url":"https://api.github.com/users/kartik-v/events{/privacy}","received_events_url":"https://api.github.com/users/kartik-v/received_events","type":"User","site_admin":false},"repo":{"id":19319308,"name":"dependent-dropdown","full_name":"kartik-v/dependent-dropdown","owner":{"login":"kartik-v","id":3592619,"avatar_url":"https://avatars.githubusercontent.com/u/3592619?v=3","gravatar_id":"","url":"https://api.github.com/users/kartik-v","html_url":"https://github.com/kartik-v","followers_url":"https://api.github.com/users/kartik-v/followers","following_url":"https://api.github.com/users/kartik-v/following{/other_user}","gists_url":"https://api.github.com/users/kartik-v/gists{/gist_id}","starred_url":"https://api.github.com/users/kartik-v/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kartik-v/subscriptions","organizations_url":"https://api.github.com/users/kartik-v/orgs","repos_url":"https://api.github.com/users/kartik-v/repos","events_url":"https://api.github.com/users/kartik-v/events{/privacy}","received_events_url":"https://api.github.com/users/kartik-v/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kartik-v/dependent-dropdown","description":"JQuery plugin that enables to add and control multi level dependent dropdown lists.","fork":false,"url":"https://api.github.com/repos/kartik-v/dependent-dropdown","forks_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/forks","keys_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/teams","hooks_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/hooks","issue_events_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/issues/events{/number}","events_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/events","assignees_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/assignees{/user}","branches_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/branches{/branch}","tags_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/tags","blobs_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/git/refs{/sha}","trees_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/statuses/{sha}","languages_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/languages","stargazers_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/stargazers","contributors_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/contributors","subscribers_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/subscribers","subscription_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/subscription","commits_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/commits{/sha}","git_commits_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/git/commits{/sha}","comments_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/comments{/number}","issue_comment_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/issues/comments{/number}","contents_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/contents/{+path}","compare_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/merges","archive_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/downloads","issues_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/issues{/number}","pulls_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/pulls{/number}","milestones_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/milestones{/number}","notifications_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/labels{/name}","releases_url":"https://api.github.com/repos/kartik-v/dependent-dropdown/releases{/id}","created_at":"2014-04-30T16:05:18Z","updated_at":"2015-07-03T09:13:45Z","pushed_at":"2015-07-14T06:59:42Z","git_url":"git://github.com/kartik-v/dependent-dropdown.git","ssh_url":"git@github.com:kartik-v/dependent-dropdown.git","clone_url":"https://github.com/kartik-v/dependent-dropdown.git","svn_url":"https://github.com/kartik-v/dependent-dropdown","homepage":"http://plugins.krajee.com/dependent-dropdown","size":565,"stargazers_count":52,"watchers_count":52,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":1,"forks":16,"open_issues":1,"watchers":52,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kartik-v/dependent-dropdown/pulls/27"},"html":{"href":"https://github.com/kartik-v/dependent-dropdown/pull/27"},"issue":{"href":"https://api.github.com/repos/kartik-v/dependent-dropdown/issues/27"},"comments":{"href":"https://api.github.com/repos/kartik-v/dependent-dropdown/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/kartik-v/dependent-dropdown/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/kartik-v/dependent-dropdown/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kartik-v/dependent-dropdown/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/kartik-v/dependent-dropdown/statuses/6110db177b432cc25e10f8265f8fabce27967259"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":1,"review_comments":0,"commits":1,"additions":2,"deletions":2,"changed_files":1}}