diff --git a/components/select/demo/combobox.md b/components/select/demo/combobox.md index 997920fddd..d27ae1b7a5 100644 --- a/components/select/demo/combobox.md +++ b/components/select/demo/combobox.md @@ -2,7 +2,7 @@ - order: 4 -类似 Google 搜索的输入框自动提示功能。 +类似账号注册表单输入框的自动完成功能。 --- @@ -18,6 +18,12 @@ var Test = React.createClass({ }; }, handleChange(value) { + if (!value) { + this.setState({ + options: [] + }); + return; + } var options = ['gmail.com', '163.com', 'qq.com'].map(function(domain) { var email = value + '@' + domain; return ; diff --git a/package.json b/package.json index 4060ff1cad..4125035ea7 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "rc-dropdown": "~1.0.2", "rc-menu": "~3.4.0", "rc-progress": "~1.0.0", - "rc-select": "~3.4.1", + "rc-select": "~3.5.0", "rc-tabs": "~5.1.0", "rc-tooltip": "~2.1.1" }, diff --git a/style/components/select.less b/style/components/select.less index 5ae084dc72..03f92da57d 100644 --- a/style/components/select.less +++ b/style/components/select.less @@ -45,6 +45,10 @@ } } + &-combobox &-arrow { + display: none; + } + &-selection { outline: none; user-select: none;