{"action":"created","issue":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/12501","repository_url":"https://api.github.com/repos/ant-design/ant-design","labels_url":"https://api.github.com/repos/ant-design/ant-design/issues/12501/labels{/name}","comments_url":"https://api.github.com/repos/ant-design/ant-design/issues/12501/comments","events_url":"https://api.github.com/repos/ant-design/ant-design/issues/12501/events","html_url":"https://github.com/ant-design/ant-design/issues/12501","id":365894743,"node_id":"MDU6SXNzdWUzNjU4OTQ3NDM=","number":12501,"title":"Autocomplete is rendering it's menu of options and never remove it from DOM","user":{"login":"AMTourky","id":4224043,"node_id":"MDQ6VXNlcjQyMjQwNDM=","avatar_url":"https://avatars2.githubusercontent.com/u/4224043?v=4","gravatar_id":"","url":"https://api.github.com/users/AMTourky","html_url":"https://github.com/AMTourky","followers_url":"https://api.github.com/users/AMTourky/followers","following_url":"https://api.github.com/users/AMTourky/following{/other_user}","gists_url":"https://api.github.com/users/AMTourky/gists{/gist_id}","starred_url":"https://api.github.com/users/AMTourky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AMTourky/subscriptions","organizations_url":"https://api.github.com/users/AMTourky/orgs","repos_url":"https://api.github.com/users/AMTourky/repos","events_url":"https://api.github.com/users/AMTourky/events{/privacy}","received_events_url":"https://api.github.com/users/AMTourky/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"yesmeck","id":465125,"node_id":"MDQ6VXNlcjQ2NTEyNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/465125?v=4","gravatar_id":"","url":"https://api.github.com/users/yesmeck","html_url":"https://github.com/yesmeck","followers_url":"https://api.github.com/users/yesmeck/followers","following_url":"https://api.github.com/users/yesmeck/following{/other_user}","gists_url":"https://api.github.com/users/yesmeck/gists{/gist_id}","starred_url":"https://api.github.com/users/yesmeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yesmeck/subscriptions","organizations_url":"https://api.github.com/users/yesmeck/orgs","repos_url":"https://api.github.com/users/yesmeck/repos","events_url":"https://api.github.com/users/yesmeck/events{/privacy}","received_events_url":"https://api.github.com/users/yesmeck/received_events","type":"User","site_admin":false},"assignees":[{"login":"yesmeck","id":465125,"node_id":"MDQ6VXNlcjQ2NTEyNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/465125?v=4","gravatar_id":"","url":"https://api.github.com/users/yesmeck","html_url":"https://github.com/yesmeck","followers_url":"https://api.github.com/users/yesmeck/followers","following_url":"https://api.github.com/users/yesmeck/following{/other_user}","gists_url":"https://api.github.com/users/yesmeck/gists{/gist_id}","starred_url":"https://api.github.com/users/yesmeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yesmeck/subscriptions","organizations_url":"https://api.github.com/users/yesmeck/orgs","repos_url":"https://api.github.com/users/yesmeck/repos","events_url":"https://api.github.com/users/yesmeck/events{/privacy}","received_events_url":"https://api.github.com/users/yesmeck/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-10-02T13:21:50Z","updated_at":"2018-10-09T15:08:15Z","closed_at":"2018-10-09T15:08:15Z","author_association":"NONE","body":"- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.\r\n\r\n### Version\r\n3.9.2\r\n\r\n### Environment\r\nmacOS 10.13.6, chrome 69.0.3497.92, react-js 16.3.2\r\n\r\n### Reproduction link\r\n[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/6v37r7rjvr)\r\n\r\n### Steps to reproduce\r\nJust render multiple Autocomplete components which has dataSource or rendering options somehow\r\n\r\n### What is expected?\r\nAfter blur (or focus on other elements) of selecting an option the options div should be removed from DOM\r\n\r\n### What is actually happening?\r\noptions div (which contains all options) remains in the DOM and are updated later if user tries to use it again\r\n\r\n---\r\nIs it a bug or it's designed to do so? if yes, why?\r\n\r\n\r\n<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->"},"comment":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/comments/428230252","html_url":"https://github.com/ant-design/ant-design/issues/12501#issuecomment-428230252","issue_url":"https://api.github.com/repos/ant-design/ant-design/issues/12501","id":428230252,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODIzMDI1Mg==","user":{"login":"zombieJ","id":5378891,"node_id":"MDQ6VXNlcjUzNzg4OTE=","avatar_url":"https://avatars1.githubusercontent.com/u/5378891?v=4","gravatar_id":"","url":"https://api.github.com/users/zombieJ","html_url":"https://github.com/zombieJ","followers_url":"https://api.github.com/users/zombieJ/followers","following_url":"https://api.github.com/users/zombieJ/following{/other_user}","gists_url":"https://api.github.com/users/zombieJ/gists{/gist_id}","starred_url":"https://api.github.com/users/zombieJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zombieJ/subscriptions","organizations_url":"https://api.github.com/users/zombieJ/orgs","repos_url":"https://api.github.com/users/zombieJ/repos","events_url":"https://api.github.com/users/zombieJ/events{/privacy}","received_events_url":"https://api.github.com/users/zombieJ/received_events","type":"User","site_admin":false},"created_at":"2018-10-09T15:08:15Z","updated_at":"2018-10-09T15:08:15Z","author_association":"MEMBER","body":"It's by design. Every popup component in antd use [`rc-trigger`](https://www.npmjs.com/package/rc-trigger) to management the portal element status. `rc-trigger` by default keep the hidden element in the view, but if the wrapper removed (such as AutoComplete remove), the popup will also be removed.\r\n\r\nThis design is assume that in most case, popup is not necessary until user use it. But if user used, it may use not only one time. To avoid repeat create and destroy popup to affect the perf (some case, a dropdown list has over 100+ items). Keep them hidden in the document is a good way. And even if user only use it once, when the wrapper component removed, popup element also will be removed."}}
{"actor":{"display_login":"zombieJ"}}