Skip to content

Commit

Permalink
Merge pull request #39 from binjie09/master
Browse files Browse the repository at this point in the history
update ui 0.5.2
  • Loading branch information
devane001 committed Feb 22, 2019
2 parents 6dde626 + 556a98c commit f4d2d77
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ timeline: true
* Major version release is not included in this schedule for breaking change and new features.

---
## 0.5.2

`2018-02-22`

- 💄 `Table`: The confirmation button for the filter in the repair table is fixed at the bottom of the selection box and the style is overwritten.
- 🌟 `Sidebar`: add `alwaysCanCancel`.

## 0.5.1

`2018-02-19`
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ timeline: true
* 主版本号:含有破坏性更新和新特性,不在发布周期内。

---
## 0.5.2

`2018-02-22`

- 💄 `Table`: 修复Table中过滤的确认按钮固定在选择框底部样式被覆盖。
- 🌟 `Sidebar`: 增加属性alwaysCanCancel。

## 0.5.1

Expand Down
8 changes: 5 additions & 3 deletions components/modal/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export interface SidebarState {

export interface SidebarProps extends ModalFuncProps {
close?: (...args: any[]) => void;
alwaysCanCancel?: boolean;
}

export default class Sidebar extends React.Component<SidebarProps, {}> {
Expand All @@ -20,6 +21,7 @@ export default class Sidebar extends React.Component<SidebarProps, {}> {
transitionName: 'slide-right',
maskTransitionName: 'fade',
confirmLoading: false,
alwaysCanCancel: false,
visible: false,
okType: 'primary',
funcType: 'raised',
Expand Down Expand Up @@ -49,7 +51,7 @@ export default class Sidebar extends React.Component<SidebarProps, {}> {

renderFooter = () => {
const props = this.props;
const { prefixCls, onCancel, onOk, okType, funcType, confirmLoading } = props;
const { prefixCls, onCancel, onOk, okType, funcType, confirmLoading, alwaysCanCancel } = props;
const okCancel = ('okCancel' in props) ? props.okCancel! : true;
const runtimeLocale = getConfirmLocale();
const okText = props.okText ||
Expand All @@ -59,7 +61,7 @@ export default class Sidebar extends React.Component<SidebarProps, {}> {
const cancalBtn = okCancel ? (
<Button
className={`${prefixCls}-btn-cancel`}
disabled={confirmLoading}
disabled={!alwaysCanCancel && confirmLoading}
funcType={funcType}
onClick={onCancel}
>
Expand All @@ -86,7 +88,7 @@ export default class Sidebar extends React.Component<SidebarProps, {}> {
this.setState({
open: !open,
})
}
};

render() {
const props = this.props;
Expand Down
5 changes: 4 additions & 1 deletion components/modal/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ title: Modal
### Modal.SideBar

侧边栏弹出窗,API同Modal
侧边栏弹出窗,表中无说明的API同Modal
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| alwaysCanCancel | 取消按钮是否一直可按,无论是否有confirmLoading | boolean | false |

### Modal.method()

Expand Down
9 changes: 9 additions & 0 deletions components/table/demo/reset-filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@ class App extends React.Component {
filters: [
{ text: 'London', value: 'a' },
{ text: 'New York', value: 'b' },
{ text: 'New York1', value: 'c' },
{ text: 'New York2', value: 'd' },
{ text: 'New York3', value: 'e' },
{ text: 'New York4', value: 'f' },
{ text: 'New York5', value: 'g' },
{ text: 'New York6', value: 'h' },
{ text: 'New York7', value: 'i' },
{ text: 'New York8', value: 'j' },
{ text: 'New York9', value: 'k' },
],
filterMultiple: true,
filteredValue: filteredInfo.address || null,
Expand Down
4 changes: 2 additions & 2 deletions components/table/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,10 @@
}
}
&-ok-btn {
position: absolute;
position: absolute !important;
bottom: 0;
right: 0;
padding: 10px 20px;
padding: 10px 20px !important;
background-color: #fff;
width: 100%;
text-align: right;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "choerodon-ui",
"version": "0.5.1",
"version": "0.5.2",
"title": "Choerodon UI",
"description": "An enterprise-class UI design language and React-based implementation",
"homepage": "",
Expand Down

0 comments on commit f4d2d77

Please sign in to comment.