upgrade select

This commit is contained in:
yiminghe 2015-07-08 22:07:15 +08:00
parent 0a7410973e
commit 46b0685364
7 changed files with 19 additions and 14 deletions

View File

@ -16,10 +16,10 @@ function handleChange(value) {
React.render(
<Select value="lucy" style={{width:200}} onChange={handleChange}>
<Option key="jack" value="jack">jack</Option>
<Option key="lucy" value="lucy">lucy</Option>
<Option key="disabled" value="disabled" disabled>disabled</Option>
<Option key="yiminghe" value="yiminghe">yiminghe</Option>
<Option value="jack">jack</Option>
<Option value="lucy">lucy</Option>
<Option value="disabled" disabled>disabled</Option>
<Option value="yiminghe">yiminghe</Option>
</Select>
, document.getElementById('components-select-demo-basic'));
````

View File

@ -24,7 +24,7 @@ var Test = React.createClass({
} else {
options = ['gmail.com', '163.com', 'qq.com'].map(function(domain) {
var email = value + '@' + domain;
return <Option key={email} value={email}>{email}</Option>;
return <Option key={email}>{email}</Option>;
});
}
this.setState({

View File

@ -13,7 +13,7 @@ var Option = Select.Option;
var children = [];
for (var i = 10; i < 36; i++) {
children.push(<Option value={i.toString(36) + i} key={i.toString(36) + i}>{i.toString(36) + i}</Option>);
children.push(<Option key={i.toString(36) + i}>{i.toString(36) + i}</Option>);
}
function handleChange(value) {

View File

@ -16,10 +16,10 @@ function handleChange(value) {
React.render(
<Select value="lucy" showSearch={true} style={{width:200}} onChange={handleChange}>
<Option key="jack" value="jack">jack</Option>
<Option key="lucy" value="lucy">lucy</Option>
<Option key="disabled" value="disabled" disabled>disabled</Option>
<Option key="yiminghe" value="yiminghe">yiminghe</Option>
<Option value="jack">jack</Option>
<Option value="lucy">lucy</Option>
<Option value="disabled" disabled>disabled</Option>
<Option value="yiminghe">yiminghe</Option>
</Select>
, document.getElementById('components-select-demo-search'));
````

View File

@ -13,7 +13,7 @@ var Option = Select.Option;
var children = [];
for (var i = 10; i < 36; i++) {
children.push(<Option value={i.toString(36) + i} key={i.toString(36) + i}>{i.toString(36) + i}</Option>);
children.push(<Option key={i.toString(36) + i}>{i.toString(36) + i}</Option>);
}
function handleChange(value) {

View File

@ -21,7 +21,7 @@
"rc-input-number": "~2.0.0",
"rc-menu": "~3.4.0",
"rc-progress": "~1.0.0",
"rc-select": "~4.2.0",
"rc-select": "~4.2.1",
"rc-steps": "~1.1.3",
"rc-switch": "~1.1.0",
"rc-tabs": "~5.2.0",

View File

@ -1,7 +1,8 @@
@selectPrefixCls: ant-select;
@import "../mixins/iconfont";
//mixin
.selection__clear(){
.selection__clear() {
cursor: pointer;
float: right;
font-weight: bold;
@ -131,6 +132,7 @@
}
.@{selectPrefixCls}-selection__choice__remove {
.iconfont-mixin();
color: #919191;
cursor: pointer;
display: inline-block;
@ -139,6 +141,10 @@
&:hover {
color: #333;
}
&:before {
content: "\e61e";
}
}
}
@ -157,7 +163,6 @@
}
}
&-dropdown {
display: none;
background-color: white;