From 0a1cfccd221163243a4d2d7b6b1b0d34955b03b3 Mon Sep 17 00:00:00 2001 From: yiminghe Date: Thu, 20 Aug 2015 17:27:40 +0800 Subject: [PATCH] upgrade select. Fixes #170 --- components/select/demo/basic.md | 2 +- components/select/demo/coordinate.md | 13 ++++++++++--- components/select/demo/multiple.md | 2 +- components/select/demo/optgroup.md | 2 +- components/select/demo/search.md | 2 +- components/select/demo/size.md | 8 ++++---- components/select/demo/tags.md | 2 +- components/select/index.md | 2 +- package.json | 7 ++++--- style/components/select.less | 4 +++- 10 files changed, 27 insertions(+), 17 deletions(-) diff --git a/components/select/demo/basic.md b/components/select/demo/basic.md index 3a21d590f9..e91954d252 100644 --- a/components/select/demo/basic.md +++ b/components/select/demo/basic.md @@ -15,7 +15,7 @@ function handleChange(value) { } React.render( - diff --git a/components/select/demo/coordinate.md b/components/select/demo/coordinate.md index a83588fb12..be9f9a423c 100644 --- a/components/select/demo/coordinate.md +++ b/components/select/demo/coordinate.md @@ -20,12 +20,19 @@ var cityData = { var App = React.createClass({ getInitialState() { return { - cities: cityData[provinceData[0]] + cities: cityData[provinceData[0]], + secondCity:cityData[provinceData[0]][0] }; }, handleProvinceChange(value) { this.setState({ - cities: cityData[value] + cities: cityData[value], + secondCity:cityData[value][0] + }); + }, + onSecondCityChange(value) { + this.setState({ + secondCity: value }); }, render() { @@ -40,7 +47,7 @@ var App = React.createClass({ {provinceOptions}   - {cityOptions} ; diff --git a/components/select/demo/multiple.md b/components/select/demo/multiple.md index 4460b7e846..fb9b058327 100644 --- a/components/select/demo/multiple.md +++ b/components/select/demo/multiple.md @@ -23,7 +23,7 @@ function handleChange(value) { React.render( , document.getElementById('components-select-demo-multiple')); diff --git a/components/select/demo/optgroup.md b/components/select/demo/optgroup.md index 10e049c484..aff602ecd2 100644 --- a/components/select/demo/optgroup.md +++ b/components/select/demo/optgroup.md @@ -16,7 +16,7 @@ function handleChange(value) { } React.render( - + + - - @@ -42,4 +42,4 @@ React.render( .ant-select{ margin: 0 10px 10px 0; } -```` \ No newline at end of file +```` diff --git a/components/select/demo/tags.md b/components/select/demo/tags.md index cae1403db3..d0b058ef00 100644 --- a/components/select/demo/tags.md +++ b/components/select/demo/tags.md @@ -23,7 +23,7 @@ function handleChange(value) { React.render( , document.getElementById('components-select-demo-tags')); diff --git a/components/select/index.md b/components/select/index.md index 108fe725ee..e09a41bc42 100644 --- a/components/select/index.md +++ b/components/select/index.md @@ -24,7 +24,7 @@ | 参数 | 说明 | 类型 | 默认值 | |----------|----------------|----------|--------------| -| value | 指定选中的条目 | string/Array | 无 | +| value | 指定当前选中的条目 | string/Array | 无 | | defaultValue | 指定默认选中的条目 | string/Array | 无 | | multiple | 支持多选 | | false | | filterOption | 是否根据输入项进行筛选 | | true | diff --git a/package.json b/package.json index 2e949b453b..663101e001 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "gregorian-calendar-format": "~3.0.1", "is-equal-shallow": "~0.1.3", "object-assign": "3.x", + "rc-animate": "~1.1.0", "rc-calendar": "~3.13.0", "rc-checkbox": "~1.1.1", "rc-collapse": "~1.2.3", @@ -50,7 +51,7 @@ "rc-pagination": "~1.1.0", "rc-progress": "~1.0.0", "rc-radio": "~2.0.0", - "rc-select": "~4.7.1", + "rc-select": "~4.8.0", "rc-slider": "~1.4.0", "rc-steps": "~1.1.4", "rc-switch": "~1.2.0", @@ -61,8 +62,7 @@ "rc-upload": "~1.3.1", "rc-util": "~2.0.3", "react-slick2": "~0.6.6", - "reqwest": "~2.0.1", - "rc-animate": "~1.1.0" + "reqwest": "~2.0.1" }, "devDependencies": { "autoprefixer-loader": "~2.0.0", @@ -83,6 +83,7 @@ "lodash": "^3.10.0", "nico-jsx": "~0.5.8", "precommit-hook": "^1.0.7", + "rc-tabs": "~5.3.3", "webpack": "^1.10.1", "webpack-dev-middleware": "^1.2.0" }, diff --git a/style/components/select.less b/style/components/select.less index e956ca9171..c1386d7fe2 100644 --- a/style/components/select.less +++ b/style/components/select.less @@ -291,7 +291,9 @@ } &-dropdown { - display: none; + &-hidden { + display: none; + } background-color: white; border: 1px solid #d9d9d9; box-shadow: @overlay-shadow;