Skip to content

Commit

Permalink
Merge branch 'master' into antd-3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Oct 23, 2017
2 parents 529f9fa + ff5d051 commit 3f57d5f
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sudo: false
language: node_js

node_js:
- "8"
- "8.5"

env:
matrix:
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi

---

## 2.13.7

`2017-10-22`

- 🐞 Fix input height in AutoComplete. [#7918](https://github.com/ant-design/ant-design/issues/7918)
- 🐞 Fix Cascader `inputPrefixCls` can not be fully effective. [#7945](https://github.com/ant-design/ant-design/pull/7945) [@vgeyi](https://github.com/vgeyi)
- 🐞 Fix extra margin in sider Layout. [#7967](https://github.com/ant-design/ant-design/issues/7967)
- 🐞 Fix RangePicker can not close panel when click presetted ranges. [#7747](https://github.com/ant-design/ant-design/issues/7747)
- Table
- 🐞 Fix Radio can not be centered in Table column. [#7969](https://github.com/ant-design/ant-design/issues/7969)
- 🐞 Fix Table filter can't show after remove fixed setting. [#7909](https://github.com/ant-design/ant-design/issues/7909)
- 🌟 Add `scrollNumberPrefixCls` prop for Badge. [#7882](https://github.com/ant-design/ant-design/pull/7882) [@vgeyi](https://github.com/vgeyi)
- 🌟 Add some less variables. [#7886](https://github.com/ant-design/ant-design/issues/7886) [@syssam](https://github.com/syssam)

## 2.13.6

`2017-10-12`
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ timeline: true

---

## 2.13.7

`2017-10-22`

- 🐞 修复了 AutoComplete 的 input 高度。 [#7918](https://github.com/ant-design/ant-design/issues/7918)
- 🐞 修复了 Cascader `inputPrefixCls` 不能完全生效的问题。[#7945](https://github.com/ant-design/ant-design/pull/7945) [@vgeyi](https://github.com/vgeyi)
- 🐞 修复了有侧边栏的 Layout 存在多余外边距的问题。[#7967](https://github.com/ant-design/ant-design/issues/7967)
- 🐞 修复了 RangePicker 在选中预设范围时间时不能关闭选择面板的问题。[#7747](https://github.com/ant-design/ant-design/issues/7747)
- Table
- 🐞 修复了 Table 列中 Radio 选择框无法居中的问题。[#7969](https://github.com/ant-design/ant-design/issues/7969)
- 🐞 修复了去掉 `fixed` 属性设置后 Table 列无法进行筛选的问题。[#7909](https://github.com/ant-design/ant-design/issues/7909)
- 🌟 Badge 新增 `scrollNumberPrefixCls` 属性。[#7882](https://github.com/ant-design/ant-design/pull/7882) [@vgeyi](https://github.com/vgeyi)
- 🌟 补充了一些 less 变量。[#7886](https://github.com/ant-design/ant-design/issues/7886) [@syssam](https://github.com/syssam)

## 2.13.6

`2017-10-12`
Expand Down
5 changes: 5 additions & 0 deletions components/layout/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@

&-children {
height: 100%;
// Hack for fixing margin collaspe bug
// https://github.com/ant-design/ant-design/issues/7967
// solution from https://stackoverflow.com/a/33132624/3040605
padding-top: 0.1px;
margin-top: -0.1px;
}

&-has-trigger {
Expand Down
3 changes: 3 additions & 0 deletions components/modal/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ and so on.
| maskClosable | Whether to close the modal dialog when the mask (area outside the modal) is clicked | boolean | true |
| style | Style of floating layer, typically used at least for adjusting the position. | object | - |
| wrapClassName | The class name of the container of the modal dialog | string | - |
| bodyStyle | Body style for modal body element. Such as height, padding etc. | object | {} |
| maskStyle | Style for modal's mask element. | object | {} |
| mask | Whether show mask or not. | Boolean | true |
| afterClose | Specify a function that will be called when modal is closed completely. | function | - |
| getContainer | Return the mount node for Modal | (instance): HTMLElement | () => document.body |
| zIndex | The `z-index` of the Modal | Number | 1000 |
Expand Down
3 changes: 3 additions & 0 deletions components/modal/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ title: Modal
| maskClosable | 点击蒙层是否允许关闭 | boolean | true |
| style | 可用于设置浮层的样式,调整浮层位置等 | object | - |
| wrapClassName | 对话框外层容器的类名 | string | - |
| bodyStyle | Modal body 样式 | object | {} |
| maskStyle | 遮罩样式 | object | {} |
| mask | 是否展示遮罩 | Boolean | true |
| afterClose | Modal 完全关闭后的回调 | function ||
| getContainer | 指定 Modal 挂载的 HTML 节点 | (instance): HTMLElement | () => document.body |
| zIndex | 设置 Modal 的 `z-index` | Number | 1000 |
Expand Down
2 changes: 1 addition & 1 deletion components/table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ export default class Table<T> extends React.Component<TableProps<T>, any> {
changeableRowKeys.forEach(key => {
if (selectedRowKeys.indexOf(key) < 0) {
selectedRowKeys.push(key);
}else {
} else {
selectedRowKeys.splice(selectedRowKeys.indexOf(key), 1);
}
changeRowKeys.push(key);
Expand Down
22 changes: 14 additions & 8 deletions components/table/filterDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,12 @@ export default class FilterMenu extends React.Component<FilterMenuProps, any> {

componentDidMount() {
const { column } = this.props;
const rootNode = ReactDOM.findDOMNode(this);
const filterBelongToScrollBody = !!closest(rootNode, `.ant-table-scroll`);
if (filterBelongToScrollBody && column.fixed) {
// When fixed column have filters, there will be two dropdown menus
// Filter dropdown menu inside scroll body should never be shown
// To fix https://github.com/ant-design/ant-design/issues/5010
this.neverShown = true;
}
this.setNeverShown(column);
}

componentWillReceiveProps(nextProps) {
const { column } = nextProps;
this.setNeverShown(column);
const newState = {} as {
selectedKeys: string[];
visible: boolean;
Expand All @@ -77,6 +71,18 @@ export default class FilterMenu extends React.Component<FilterMenuProps, any> {
}
}

setNeverShown = (column) => {
const rootNode = ReactDOM.findDOMNode(this);
const filterBelongToScrollBody = !!closest(rootNode, `.ant-table-scroll`);
if (filterBelongToScrollBody) {
// When fixed column have filters, there will be two dropdown menus
// Filter dropdown menu inside scroll body should never be shown
// To fix https://github.com/ant-design/ant-design/issues/5010 and
// https://github.com/ant-design/ant-design/issues/7909
this.neverShown = !!column.fixed;
}
}

setSelectedKeys = ({ selectedKeys }) => {
this.setState({ selectedKeys });
}
Expand Down
3 changes: 3 additions & 0 deletions components/table/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@
text-align: center;
min-width: 62px;
width: 62px;
.@{ant-prefix}-radio-wrapper {
margin-right: 0;
}
}

&-expand-icon-th,
Expand Down
2 changes: 1 addition & 1 deletion components/upload/__tests__/upload.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('Upload', () => {
const props = {
action: 'http://upload.com',
beforeUpload: () => new Promise(resolve =>
setTimeout(() => resolve('success'))
setTimeout(() => resolve('success'), 1000)
),
data,
onChange: ({ file }) => {
Expand Down
1 change: 0 additions & 1 deletion site/theme/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ module.exports = {
'app.footer.resources': 'Resources',
'app.footer.data-vis': 'Data Visualization',
'app.footer.eggjs': 'Enterprise Node Framework',
'app.footer.encloseio': 'Node.js Compiler',
'app.footer.motion': 'Motion Solution',
'app.footer.antd-library': 'Axure library',
'app.footer.design-platform': 'Ant Financial Design Platform',
Expand Down
5 changes: 0 additions & 5 deletions site/theme/template/Layout/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,6 @@ class Footer extends React.Component {
<span> - </span>
<FormattedMessage id="app.footer.antux" />
</div>
<div>
<a target="_blank" rel="noopener noreferrer" href="http://enclose.io/">Enclose.IO</a>
<span> - </span>
<FormattedMessage id="app.footer.encloseio" />
</div>
</li>
<li>
<h2><Icon type="customer-service" /> <FormattedMessage id="app.footer.community" /></h2>
Expand Down
1 change: 0 additions & 1 deletion site/theme/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ module.exports = {
'app.footer.resources': '资源链接',
'app.footer.data-vis': '数据可视化',
'app.footer.eggjs': '企业级 Node 开发框架',
'app.footer.encloseio': 'Node.js 编译器',
'app.footer.motion': '设计动效',
'app.footer.antd-library': 'Axure 部件库',
'app.footer.design-platform': '蚂蚁金服设计平台',
Expand Down

0 comments on commit 3f57d5f

Please sign in to comment.