Compare commits

...

8 Commits
2.4.0 ... 2.4.2

Author SHA1 Message Date
afc163
5400cacd13 bump 2.4.2 2016-11-13 16:33:39 +08:00
afc163
ee8ac670b9 change jest config 2016-11-13 16:03:59 +08:00
Benjy Cui
449db1499b deps: lock deps to patch (#3816) 2016-11-13 15:53:50 +08:00
Wei Zhu
b0c7a714ad Don't pass visible to Dropdown if it's not exits. (#3821)
fix #3815
2016-11-13 15:53:02 +08:00
afc163
8457267dad update changelog for 2.4.1, #3811 2016-11-13 15:51:46 +08:00
afc163
24bd14d843 update CHANGELOG 2016-11-11 20:11:02 +08:00
afc163
f93e2a8df0 update CHANGELOG 2016-11-11 20:09:40 +08:00
afc163
3c9ccccf61 Fix Header select 2016-11-11 19:47:11 +08:00
6 changed files with 81 additions and 27 deletions

View File

@@ -9,20 +9,40 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi
---
## 2.4.2
`2016-11-13`
* Fix `Dropdown.Button` cannot popup menu.[#3815](https://github.com/ant-design/ant-design/issues/3815)
## 2.4.1
`2016-11-11`
* Fix `2.4.0` missing index files.
## 2.4.0
`2016-11-11`
* Adjust components structure.
* New [Anchor](https://ant.design/components/anchor) Component.
* Add new props `selectedKeys` for `Transfer` component [#3729]. (https://github.com/ant-design/ant-design/issues/3729)
* Fix less variables `@font-size-base` and `@text-color`, add `@font-size-lg` `@text-color-secondary`.
* Add new props `selectedKeys` for `Transfer` component [#3729]. (https://github.com/ant-design/ant-design/issues/3729)
* Add `Tag` selected status.
* Fix `Today` button of `DatePicker`. [#3748](https://github.com/ant-design/ant-design/issues/3748)
* Fix `Dropdown.Button` not support `visible` and `onVisibleChange`. [#3779](https://github.com/ant-design/ant-design/issues/3779)
* Fix `Now` button of `DatePicker[showTime]`. [#3748](https://github.com/ant-design/ant-design/issues/3748)
* Fix style of `Steps` in vertical mode. [#3760](https://github.com/ant-design/ant-design/issues/3760)
* Fix style compatibility of `Spin` in IE10+.[#3755](https://github.com/ant-design/ant-design/issues/3755)
* Fix default style of `Carousel` component.
* Fix focus logic of `Mention` component. [#3801](https://github.com/ant-design/ant-design/issues/3801)
* Fix animate bug of `Progress` component. [#3784](https://github.com/ant-design/ant-design/issues/3784)
* Fix focus bug of `Select` component. [#3778](https://github.com/ant-design/ant-design/issues/3778)
* Improve style of `TimePicker`. [#3793](https://github.com/ant-design/ant-design/issues/3793)
* Fix `TimePicker` not support `format="HH"` bug. [#3793](https://github.com/ant-design/ant-design/issues/3793)
* Improve perfermance of `Table` selection. [#3757](https://github.com/ant-design/ant-design/pull/3757)
* Improve Carousel default UI style.
* Improve style of `Checkbox` and `Radio`. [#3590](https://github.com/ant-design/ant-design/issues/3590)
* Fix style of DatePickek, Form, Table.
## 2.3.2

View File

@@ -9,19 +9,39 @@ timeline: true
---
## 2.4.2
`2016-11-13`
* 修复 `Dropdown.Button` 不弹出的问题。[#3815](https://github.com/ant-design/ant-design/issues/3815)
## 2.4.1
`2016-11-11`
* 修复 `2.4.0` 组件 index 文件丢失的问题。
## 2.4.0
* 新增 [Anchor](https://ant.design/components/anchor) 组件.
*`Transfer` 组件新增了受控属性 `selectedKeys`. [#3729](https://github.com/ant-design/ant-design/issues/3729)
* `Tag` 新增选中状态.
* 修复 `DatePicker``今天` 按钮. [#3748](https://github.com/ant-design/ant-design/issues/3748)
* 修复 `Steps` 竖直方向的样式. [#3760](https://github.com/ant-design/ant-design/issues/3760)
* 修复 `Carousel` 的默认样式.
`2016-11-11`
* 调整了组件的导航结构。
* 新增 [Anchor](https://ant.design/components/anchor) 锚点组件。
* 整理了样式变量,修复 `@font-size-base``@text-color` 在部分组件无效的问题,新增 `@font-size-lg` `@text-color-secondary`,并移除了部分无用的变量。
* `Transfer` 组件新增了受控属性 `selectedKeys`。[#3729](https://github.com/ant-design/ant-design/issues/3729)
* `Tag` 新增选中状态。
* 修复 `Dropdown.Button` 不支持 `visible``onVisibleChange` 的问题。[#3779](https://github.com/ant-design/ant-design/issues/3779)
* 修复 `DatePicker[showTime]`` 的 `此刻` 按钮。[#3748](https://github.com/ant-design/ant-design/issues/3748)
* 修复 `Steps` 竖直方向的样式。[#3760](https://github.com/ant-design/ant-design/issues/3760)
* 修复 `Spin` 组件在 IE10+ 的样式问题。[#3755](https://github.com/ant-design/ant-design/issues/3755)
* 修复 `Mention` 组件的 focus 逻辑. [#3801](https://github.com/ant-design/ant-design/issues/3801)
* 修复 `Progress` 组件的动画 bug. [#3784](https://github.com/ant-design/ant-design/issues/3784)
* 修复 `Select` 的焦点bug. [#3778](https://github.com/ant-design/ant-design/issues/3778)
* 优化 `TimePicker` 的样式. [#3793](https://github.com/ant-design/ant-design/issues/3793)
* 优化 `Checkbox``Radio` 的样式. [#3590](https://github.com/ant-design/ant-design/issues/3590)
* 修复 `Progress` 组件的动画问题。[#3784](https://github.com/ant-design/ant-design/issues/3784)
* 修复 `Select` 搜索时的丢失焦点问题。[#3778](https://github.com/ant-design/ant-design/issues/3778)
* 修复 `TimePicker` 不支持 `format="HH"` 等格式的问题。[#3793](https://github.com/ant-design/ant-design/issues/3793)
* 优化 `Table` 选择的性能。[#3757](https://github.com/ant-design/ant-design/pull/3757)
* 优化 `Carousel` 的默认样式。
* 优化 `Checkbox``Radio` 的样式。[#3590](https://github.com/ant-design/ant-design/issues/3590)
* 修复 `DatePicker``Form``Table` 等组件的样式细节。
## 2.3.2

View File

@@ -43,16 +43,21 @@ export default class DropdownButton extends React.Component<DropdownButtonProps,
[className]: !!className,
});
const dropdownProps = {
align,
overlay,
trigger: disabled ? [] : trigger,
onVisibleChange,
};
if ('visible' in this.props) {
(dropdownProps as any).visible = visible;
}
return (
<ButtonGroup {...restProps} className={cls}>
<Button type={type} onClick={onClick} disabled={disabled}>{children}</Button>
<Dropdown
align={align}
overlay={overlay}
trigger={disabled ? [] : trigger}
visible={visible}
onVisibleChange={onVisibleChange}
>
<Dropdown {...dropdownProps}>
<Button type={type} disabled={disabled}>
<Icon type="down" />
</Button>

View File

@@ -1,6 +1,6 @@
{
"name": "antd",
"version": "2.4.0",
"version": "2.4.2",
"title": "Ant Design",
"description": "An enterprise-class UI design language and React-based implementation",
"homepage": "http://ant.design/",
@@ -39,7 +39,7 @@
"css-animation": "^1.2.5",
"gregorian-calendar": "~4.1.0",
"gregorian-calendar-format": "~4.1.0",
"moment": "^2.15.1",
"moment": "~2.15.1",
"object-assign": "~4.1.0",
"omit.js": "^0.1.0",
"rc-animate": "~2.3.0",
@@ -78,7 +78,7 @@
"devDependencies": {
"@types/react": "~0.14.41",
"@types/react-dom": "~0.14.18",
"antd-tools": "^0.13.0",
"antd-tools": "~0.14.0",
"babel-eslint": "^7.1.0",
"babel-jest": "^17.0.0",
"babel-plugin-import": "^1.0.0",
@@ -162,7 +162,9 @@
"testPathIgnorePatterns": [
"/node_modules/"
],
"scriptPreprocessor": "node_modules/typescript-babel-jest",
"transform": {
".*": "node_modules/typescript-babel-jest"
},
"testRegex": "(/tests/.*|\\.(test|spec))\\.(js)$"
},
"pre-commit": [

View File

@@ -142,10 +142,10 @@ export default class Header extends React.Component {
</Col>
<Col lg={20} md={18} sm={17} xs={0} style={{ display: 'block' }}>
<div id="search-box">
<Select combobox
<Select
combobox
dropdownClassName="component-select"
placeholder={searchPlaceholder}
value={undefined}
optionFilterProp="data-label"
optionLabelProp="data-label"
filterOption={this.handleSelectFilter}

View File

@@ -26,4 +26,11 @@ describe('DropdownButton', () => {
expect(dropdownProps[key]).toBe(props[key]);
});
});
it('don\'t pass visible to Dropdown if it\'s not exits', () => {
const wrapper = shallow(<Dropdown.Button />);
const dropdownProps = wrapper.find(Dropdown).props();
expect('visible' in dropdownProps).toBe(false);
});
});