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

combobox 模式时,默认高亮第一个 #38

Closed
afc163 opened this issue Dec 17, 2015 · 5 comments
Closed

combobox 模式时,默认高亮第一个 #38

afc163 opened this issue Dec 17, 2015 · 5 comments

Comments

@afc163
Copy link
Member

afc163 commented Dec 17, 2015

演示:http://react-component.github.io/select/examples/suggest.html
版本:5.4.0
重现步骤:输入『w』,弹出搜索建议框,删除『w』后再次输入『r』,第一个选项未默认高亮。希望可以实现默认高亮功能。

@afc163 afc163 changed the title combobox 模式时,默认选中第一个 combobox 模式时,默认hover第一个 Dec 17, 2015
@afc163 afc163 changed the title combobox 模式时,默认hover第一个 combobox 模式时,默认高亮第一个 Dec 17, 2015
@yiminghe
Copy link
Member

高亮了啊

@afc163
Copy link
Member Author

afc163 commented Dec 18, 2015

试试『就』『他』或者随便哪个字母,好像不是很稳定。


补充:第一次貌似可以,删了重新输入第二次就不行了。

@afc163
Copy link
Member Author

afc163 commented Dec 18, 2015

看了下这种搜索提示的交互,一般有两种:

  1. 类似 https://www.alitrip.com/ 的城市输入,会有默认选中的行为,可直接回车选择。
  2. 还有 http://www.baidu.com 和 google 的搜索框自动完成,默认不选中。

是不是加一个 selectFirstOnInput 的选项,类似这个:http://docs.spmjs.io/arale-autocomplete/latest/examples/#%E9%BB%98%E8%AE%A4%E9%80%89%E4%B8%AD%E7%AC%AC%E4%B8%80%E4%B8%AA

@yiminghe
Copy link
Member

defaultActiveFirst

@afc163
Copy link
Member Author

afc163 commented Dec 22, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants