{"action":"created","issue":{"url":"https://api.github.com/repos/zenkiezhu/jquery-cascading-select/issues/1","repository_url":"https://api.github.com/repos/zenkiezhu/jquery-cascading-select","labels_url":"https://api.github.com/repos/zenkiezhu/jquery-cascading-select/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/zenkiezhu/jquery-cascading-select/issues/1/comments","events_url":"https://api.github.com/repos/zenkiezhu/jquery-cascading-select/issues/1/events","html_url":"https://github.com/zenkiezhu/jquery-cascading-select/pull/1","id":297848034,"number":1,"title":"Fixes first level without children / Adds placeholder option","user":{"login":"emkayy","id":731228,"avatar_url":"https://avatars2.githubusercontent.com/u/731228?v=4","gravatar_id":"","url":"https://api.github.com/users/emkayy","html_url":"https://github.com/emkayy","followers_url":"https://api.github.com/users/emkayy/followers","following_url":"https://api.github.com/users/emkayy/following{/other_user}","gists_url":"https://api.github.com/users/emkayy/gists{/gist_id}","starred_url":"https://api.github.com/users/emkayy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emkayy/subscriptions","organizations_url":"https://api.github.com/users/emkayy/orgs","repos_url":"https://api.github.com/users/emkayy/repos","events_url":"https://api.github.com/users/emkayy/events{/privacy}","received_events_url":"https://api.github.com/users/emkayy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-16T16:43:00Z","updated_at":"2018-02-19T14:27:39Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/zenkiezhu/jquery-cascading-select/pulls/1","html_url":"https://github.com/zenkiezhu/jquery-cascading-select/pull/1","diff_url":"https://github.com/zenkiezhu/jquery-cascading-select/pull/1.diff","patch_url":"https://github.com/zenkiezhu/jquery-cascading-select/pull/1.patch"},"body":"Fix: If data tree has only first level without children / sublevel, the script breaks.\r\nAdded: Placeholder text option if you want to display default text before first selection and prevent the selects from being prefilled with the first option of each level."},"comment":{"url":"https://api.github.com/repos/zenkiezhu/jquery-cascading-select/issues/comments/366708516","html_url":"https://github.com/zenkiezhu/jquery-cascading-select/pull/1#issuecomment-366708516","issue_url":"https://api.github.com/repos/zenkiezhu/jquery-cascading-select/issues/1","id":366708516,"user":{"login":"emkayy","id":731228,"avatar_url":"https://avatars2.githubusercontent.com/u/731228?v=4","gravatar_id":"","url":"https://api.github.com/users/emkayy","html_url":"https://github.com/emkayy","followers_url":"https://api.github.com/users/emkayy/followers","following_url":"https://api.github.com/users/emkayy/following{/other_user}","gists_url":"https://api.github.com/users/emkayy/gists{/gist_id}","starred_url":"https://api.github.com/users/emkayy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emkayy/subscriptions","organizations_url":"https://api.github.com/users/emkayy/orgs","repos_url":"https://api.github.com/users/emkayy/repos","events_url":"https://api.github.com/users/emkayy/events{/privacy}","received_events_url":"https://api.github.com/users/emkayy/received_events","type":"User","site_admin":false},"created_at":"2018-02-19T14:27:39Z","updated_at":"2018-02-19T14:27:39Z","author_association":"NONE","body":"Sorry for my incomplete pull request, I only realised afterwards!\r\nBut thanks for your quick response!\r\n\r\nAfter another review I think I'll set entries to something like \" - \" in case there are no children, because these are two different cases. My placeholder message will say \"Please select\". However, if children are empty, there's nothing to select. So initially I want the first drop down to say \"Please select\" and all subsequent selects so show \" - \" to indicate they are empty. Only when you select an actual option the next select will say \"Please select\" and so on.\r\n\r\n```\r\nif (curNode && curNode.children && curNode.children.length) {\r\n\tentries = curNode.children;\r\n} else {\r\n\tentries = [{text: '-', value: ''}];\r\n}\r\n```\r\nOr you could introduce another option \"empty\" that has a default value of \"-\"?"}}
{"actor":{"display_login":"emkayy"}}