Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

官网DEMO的SELECT自动补全功能存在不显示下拉列表的BUG #3958

Closed
xyzcoconut opened this issue Nov 22, 2016 · 5 comments
Closed
Assignees
Labels
🐛 Bug Ant Design Team had proved that this is a bug.

Comments

@xyzcoconut
Copy link

2016-11-22 19 31 33

之前几个版本,在这里输入关键字,会自动跳出下拉列表提示。但是今天上去看2.4.3版本,输入文字以后经常会不显示下拉列表,需要按一下向下/向上箭头、空格或者多输入几个字符才会跳出下拉列表。

@benjycui
Copy link
Contributor

是有问题,请求已经发出并且收到响应,但是结果列表没有展示出来。

@xyzcoconut
Copy link
Author

@benjycui 应该是组件的bug吧?因为我在线上的项目里也出现了这个问题

@afc163
Copy link
Member

afc163 commented Nov 24, 2016

@RaoHai 来看下,貌似和之前的改动 react-component/select#134#3778 有关。

1.x 上的例子是好的:http://1x.ant.design/components/select/#components-select-demo-search-box

@afc163 afc163 added the 🐛 Bug Ant Design Team had proved that this is a bug. label Nov 24, 2016
@RaoHai
Copy link
Contributor

RaoHai commented Nov 25, 2016

https://github.com/react-component/select/blob/master/src/Select.jsx#L702

此处。

第一次 onChange 的时候,触发 adjustOpenState ,此时 children 仍为空,open 就会被设成 false 了。

异步获取到数据的时候,再 setState, 触发 adjustOpenState , 此时因为 open 为 false,不会进入判断 children 的逻辑。。

adjustOpenState 的初衷是修复这个问题, #2975 。想想是不是有更好的方法……

@lock
Copy link

lock bot commented May 3, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 Bug Ant Design Team had proved that this is a bug.
Projects
None yet
Development

No branches or pull requests

4 participants