{"action":"created","issue":{"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/1518","repository_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle","labels_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/1518/labels{/name}","comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/1518/comments","events_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/1518/events","html_url":"https://github.com/javiereguiluz/EasyAdminBundle/issues/1518","id":206972984,"number":1518,"title":"Can't get EasyAdminAutocompleteType to work in a collection","user":{"login":"mikeelltt","id":3773162,"avatar_url":"https://avatars3.githubusercontent.com/u/3773162?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeelltt","html_url":"https://github.com/mikeelltt","followers_url":"https://api.github.com/users/mikeelltt/followers","following_url":"https://api.github.com/users/mikeelltt/following{/other_user}","gists_url":"https://api.github.com/users/mikeelltt/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeelltt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeelltt/subscriptions","organizations_url":"https://api.github.com/users/mikeelltt/orgs","repos_url":"https://api.github.com/users/mikeelltt/repos","events_url":"https://api.github.com/users/mikeelltt/events{/privacy}","received_events_url":"https://api.github.com/users/mikeelltt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-02-11T10:50:59Z","updated_at":"2017-03-09T15:01:03Z","closed_at":"2017-03-09T10:45:24Z","body":"I have a form type that utilises the EasyAdminAutocompleteType which gets rendered as a plain select instead of select2.\r\n\r\nThe \"Artist\" field should be autocomplete:\r\n\r\n<img width=\"1043\" alt=\"screen shot 2017-02-11 at 13 26 56\" src=\"https://cloud.githubusercontent.com/assets/3773162/22853137/1f06dda6-f05f-11e6-8243-f7ef79ff638c.png\">\r\n\r\nHere's the configuration:\r\n\r\n```yaml\r\n# /app/config/config.yml\r\neasy_admin:\r\n    entities:\r\n        Event:\r\n            class: ApiBundle\\Entity\\Event\r\n            form:\r\n                fields:\r\n                    - property: 'performances'\r\n                      type: 'collection'\r\n                      by_reference: false\r\n                      type_options:\r\n                        entry_type: 'AppBundle\\Form\\PerformanceType'\r\n                        by_reference: false\r\n```\r\n\r\nand the form type:\r\n\r\n```php\r\n// /src/AppBundle/Form/PerformanceType.php\r\n// ...\r\nclass PerformanceType extends AbstractType\r\n{\r\n    public function buildForm(FormBuilderInterface $builder, array $options)\r\n    {\r\n        $builder->add('artist', EasyAdminAutocompleteType::class, ['class' => Artist::class]);\r\n        $builder->add('songs_description', TextareaType::class);\r\n    }\r\n    // ...\r\n}\r\n```\r\n\r\nI tried fixing it listening for \"easyadmin.collection.item-added\" event and applying select2 manually on that select element but autocompletion doesn't fetch values in this case."},"comment":{"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/comments/285375046","html_url":"https://github.com/javiereguiluz/EasyAdminBundle/issues/1518#issuecomment-285375046","issue_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/1518","id":285375046,"user":{"login":"mikeelltt","id":3773162,"avatar_url":"https://avatars3.githubusercontent.com/u/3773162?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeelltt","html_url":"https://github.com/mikeelltt","followers_url":"https://api.github.com/users/mikeelltt/followers","following_url":"https://api.github.com/users/mikeelltt/following{/other_user}","gists_url":"https://api.github.com/users/mikeelltt/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeelltt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeelltt/subscriptions","organizations_url":"https://api.github.com/users/mikeelltt/orgs","repos_url":"https://api.github.com/users/mikeelltt/repos","events_url":"https://api.github.com/users/mikeelltt/events{/privacy}","received_events_url":"https://api.github.com/users/mikeelltt/received_events","type":"User","site_admin":false},"created_at":"2017-03-09T15:01:03Z","updated_at":"2017-03-09T15:01:03Z","body":"@yceruto, sounds good! Thank you 😀"}}
{"actor":{"display_login":"mikeelltt"}}