{"action":"created","issue":{"url":"https://api.github.com/repos/vitalets/x-editable/issues/756","labels_url":"https://api.github.com/repos/vitalets/x-editable/issues/756/labels{/name}","comments_url":"https://api.github.com/repos/vitalets/x-editable/issues/756/comments","events_url":"https://api.github.com/repos/vitalets/x-editable/issues/756/events","html_url":"https://github.com/vitalets/x-editable/issues/756","id":73815379,"number":756,"title":"Ajax call not working in Select2 - Form Xeditable","user":{"login":"cullsin","id":5137598,"avatar_url":"https://avatars.githubusercontent.com/u/5137598?v=3","gravatar_id":"","url":"https://api.github.com/users/cullsin","html_url":"https://github.com/cullsin","followers_url":"https://api.github.com/users/cullsin/followers","following_url":"https://api.github.com/users/cullsin/following{/other_user}","gists_url":"https://api.github.com/users/cullsin/gists{/gist_id}","starred_url":"https://api.github.com/users/cullsin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cullsin/subscriptions","organizations_url":"https://api.github.com/users/cullsin/orgs","repos_url":"https://api.github.com/users/cullsin/repos","events_url":"https://api.github.com/users/cullsin/events{/privacy}","received_events_url":"https://api.github.com/users/cullsin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-07T02:52:06Z","updated_at":"2015-06-23T21:26:09Z","closed_at":null,"body":"\r\nHi, \r\n\r\nSeems like ajax call not working in x-editable \"select2\" component. I have tried the below example\r\n\r\nhttp://vitalets.github.io/x-editable/docs.html#select2\r\n\r\nIt would be great if you update the document If there are any changes in Select2 library. \r\n\r\n$('[id^=example]').editable({\r\n    select2: {\r\n            placeholder: 'Select User',\r\n            allowClear: true,\r\n            tags: true,\r\n            minimumInputLength: 3,\r\n            width: '230px',\r\n            ajax: {\r\n                url: www.example.com ,\r\n                dataType: 'json',\r\n                type: 'GET',\r\n                data: function (term, page) {\r\n                    return { query: term };\r\n                },\r\n                results: function (data, page) {\r\n                    return { results: data };\r\n                }\r\n            }\r\n        }\r\n});\r\n\r\nThanks,\r\nRaja K "},"comment":{"url":"https://api.github.com/repos/vitalets/x-editable/issues/comments/114646293","html_url":"https://github.com/vitalets/x-editable/issues/756#issuecomment-114646293","issue_url":"https://api.github.com/repos/vitalets/x-editable/issues/756","id":114646293,"user":{"login":"pembo13","id":5777117,"avatar_url":"https://avatars.githubusercontent.com/u/5777117?v=3","gravatar_id":"","url":"https://api.github.com/users/pembo13","html_url":"https://github.com/pembo13","followers_url":"https://api.github.com/users/pembo13/followers","following_url":"https://api.github.com/users/pembo13/following{/other_user}","gists_url":"https://api.github.com/users/pembo13/gists{/gist_id}","starred_url":"https://api.github.com/users/pembo13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pembo13/subscriptions","organizations_url":"https://api.github.com/users/pembo13/orgs","repos_url":"https://api.github.com/users/pembo13/repos","events_url":"https://api.github.com/users/pembo13/events{/privacy}","received_events_url":"https://api.github.com/users/pembo13/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T21:26:09Z","updated_at":"2015-06-23T21:26:09Z","body":"So I just spent about 3 hours tracing through the javascript, turns out you need to specify 'tpl' as '<select>' instead of the default '<input type=\"hidden\">'"}}