{"action":"created","issue":{"url":"https://api.github.com/repos/selectize/selectize.js/issues/992","repository_url":"https://api.github.com/repos/selectize/selectize.js","labels_url":"https://api.github.com/repos/selectize/selectize.js/issues/992/labels{/name}","comments_url":"https://api.github.com/repos/selectize/selectize.js/issues/992/comments","events_url":"https://api.github.com/repos/selectize/selectize.js/issues/992/events","html_url":"https://github.com/selectize/selectize.js/issues/992","id":128815714,"number":992,"title":"Example of create?","user":{"login":"brylie","id":17307,"avatar_url":"https://avatars.githubusercontent.com/u/17307?v=3","gravatar_id":"","url":"https://api.github.com/users/brylie","html_url":"https://github.com/brylie","followers_url":"https://api.github.com/users/brylie/followers","following_url":"https://api.github.com/users/brylie/following{/other_user}","gists_url":"https://api.github.com/users/brylie/gists{/gist_id}","starred_url":"https://api.github.com/users/brylie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brylie/subscriptions","organizations_url":"https://api.github.com/users/brylie/orgs","repos_url":"https://api.github.com/users/brylie/repos","events_url":"https://api.github.com/users/brylie/events{/privacy}","received_events_url":"https://api.github.com/users/brylie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-01-26T13:09:47Z","updated_at":"2016-11-28T10:18:03Z","closed_at":null,"body":"I am having difficulty understanding how to use the `create` function callback. I have found [one StackOverflow post describing create callback functions](http://stackoverflow.com/questions/24366365/creating-an-item-if-not-already-exists-in-selectize-js-select-box-and-ajax-updat), but am not able to get the create callback to work, as the tag is not inserted back into the select array. \n\nIs there a functional example of how to use the create method with a callback function?\n"},"comment":{"url":"https://api.github.com/repos/selectize/selectize.js/issues/comments/263233755","html_url":"https://github.com/selectize/selectize.js/issues/992#issuecomment-263233755","issue_url":"https://api.github.com/repos/selectize/selectize.js/issues/992","id":263233755,"user":{"login":"chickenboot","id":3501869,"avatar_url":"https://avatars.githubusercontent.com/u/3501869?v=3","gravatar_id":"","url":"https://api.github.com/users/chickenboot","html_url":"https://github.com/chickenboot","followers_url":"https://api.github.com/users/chickenboot/followers","following_url":"https://api.github.com/users/chickenboot/following{/other_user}","gists_url":"https://api.github.com/users/chickenboot/gists{/gist_id}","starred_url":"https://api.github.com/users/chickenboot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chickenboot/subscriptions","organizations_url":"https://api.github.com/users/chickenboot/orgs","repos_url":"https://api.github.com/users/chickenboot/repos","events_url":"https://api.github.com/users/chickenboot/events{/privacy}","received_events_url":"https://api.github.com/users/chickenboot/received_events","type":"User","site_admin":false},"created_at":"2016-11-28T10:18:03Z","updated_at":"2016-11-28T10:18:03Z","body":"Ah fair enough - I thought I'd comment for posterity in case anyone else came this way. \r\n\r\nThinking about it a little more last night, I think this is most likely due to me using coffeescript: by default CS returns the last statement (like Ruby), and I think if I were using plain javascript I wouldn't have had this problem. In the selectize code there is a check for the return value of the create function: if you don't return anything then this would just work, but obviously in coffeescript it does it behind the scenes which caused my confusion."}}
{"actor":{"display_login":"chickenboot"}}