{"action":"opened","issue":{"url":"https://api.github.com/repos/lifo101/typeahead-bundle/issues/11","labels_url":"https://api.github.com/repos/lifo101/typeahead-bundle/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/lifo101/typeahead-bundle/issues/11/comments","events_url":"https://api.github.com/repos/lifo101/typeahead-bundle/issues/11/events","html_url":"https://github.com/lifo101/typeahead-bundle/issues/11","id":115263537,"number":11,"title":"Callback example","user":{"login":"nzurita","id":921345,"avatar_url":"https://avatars.githubusercontent.com/u/921345?v=3","gravatar_id":"","url":"https://api.github.com/users/nzurita","html_url":"https://github.com/nzurita","followers_url":"https://api.github.com/users/nzurita/followers","following_url":"https://api.github.com/users/nzurita/following{/other_user}","gists_url":"https://api.github.com/users/nzurita/gists{/gist_id}","starred_url":"https://api.github.com/users/nzurita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzurita/subscriptions","organizations_url":"https://api.github.com/users/nzurita/orgs","repos_url":"https://api.github.com/users/nzurita/repos","events_url":"https://api.github.com/users/nzurita/events{/privacy}","received_events_url":"https://api.github.com/users/nzurita/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-05T11:19:17Z","updated_at":"2015-11-05T11:19:17Z","closed_at":null,"body":"Can you give an example of using callback parameter? I tryed all these and nothing happens when I click an item:\r\n\r\n        $builder\r\n            ->add('the_list', 'entity_typeahead', array('label'  => 'A list',\r\n                                                                   'class'  => 'AppBundle:TheList',\r\n                                                                   'render' => 'name',\r\n                                                                   'route'  => 'the_list',\r\n                                                                   'mapped' => false,\r\n                                                                   'callback' => 'alert(text)'\r\n                                                                   ))\r\n\r\nAlso\r\n    'callback' => 'function(text, data) {alert(text);}'\r\n\r\nNothing happens, no error, no action. I can see the attribute `data-callback=\"function(text, data) {alert(text);}\"` is correctly set.\r\n\r\nAlso, I can't see the spinner when waiting response, maybe these problems are related"}}