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

升级2.3.0后 Select 的搜索输入框无法输入,点击会失去焦点 #3778

Closed
deerW opened this issue Nov 9, 2016 · 11 comments · Fixed by react-component/select#133
Closed
Assignees

Comments

@deerW
Copy link

deerW commented Nov 9, 2016

发生问题的环境是:

  • antd 版本: 2.3.0
  • 操作系统及其版本: mac
  • 浏览器及其版本: chrome

您做了什么?请提供尽可能详细的重现步骤。

cnpm i antd
onSelect API 点击无法输入搜索内容便会失去焦点 您期待的结果是: 像官网一样正常使用 可以输入搜索内容 实际上的结果是: 无法输入要搜索的内容 直接失去焦点 可重现的在线演示

@yesmeck
Copy link
Member

yesmeck commented Nov 9, 2016

Please provide a re-producible demo: http://codepen.io/benjycui/pen/KgPZrE?editors=001

@deerW
Copy link
Author

deerW commented Nov 10, 2016

http://codepen.io/DeerW/pen/bBVzbL?editors=1111
多次点击下拉框下拉箭头,会出现下拉框打开马上合上的情况;
当选中某一项后,再想输入搜索时,点击框体,无法输入,只有点击下拉箭头才可再次输入,使用起来感觉舒适度差点。

@RaoHai RaoHai self-assigned this Nov 10, 2016
@RaoHai
Copy link
Contributor

RaoHai commented Nov 10, 2016

@HengCC
Copy link

HengCC commented Nov 10, 2016

@deerW 确实是这样的. 我今天发现了这个问题. 即使是点击下拉箭头也要点击2次才能够下拉出数据

我尝试了降版本. react->0.14.8 , antd->2.2.0 用这样的版本组合后是没有问题的. 但是升级了 react->15版本后就会出现这样的问题. 不管 antd 是2.2 还是2.3的.

@afc163
Copy link
Member

afc163 commented Nov 10, 2016

我发现点击箭头时,有时候会弹出后立刻收起。

@joe-sky
Copy link

joe-sky commented Nov 10, 2016

我使用2.3.1版也遇到了同样的问题,只有设置了showSearch属性才会触发。而且在没有选中下拉框列表中的某一项之前是不会秒收回的;但是只要选中了一项后再点开下拉框就每次都会出现这个问题。

RaoHai referenced this issue in react-component/select Nov 11, 2016
RaoHai added a commit to RaoHai/select that referenced this issue Nov 11, 2016
RaoHai added a commit to RaoHai/select that referenced this issue Nov 11, 2016
RaoHai added a commit to RaoHai/select that referenced this issue Nov 11, 2016
RaoHai added a commit to RaoHai/select that referenced this issue Nov 11, 2016
@ystarlongzi
Copy link
Contributor

这次升级后,下次再也不敢随随便便升级了。。。

@benjycui
Copy link
Contributor

@ystarlongzi 这次的是底层组件 patch 版导致,只要重装依赖都会碰到。。

@mochase
Copy link

mochase commented Nov 14, 2016

碰到同样问题了,目前有什么好的解决方法吗

@afc163
Copy link
Member

afc163 commented Nov 14, 2016

重新安装 node_modules 即可。

@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
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants