Skip to content

Commit

Permalink
fix(Transfer): fix wrong Type of title props in TransferPanel
Browse files Browse the repository at this point in the history
  • Loading branch information
jinchanz committed Mar 25, 2019
1 parent 70c1bc4 commit d088da9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions docs/transfer/demo/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Demo the customize style usage.
---

````jsx
import { Transfer } from '@alifd/next';
import { Transfer, Button } from '@alifd/next';

const dataSource = (() => {
const dataSource = [];
Expand Down Expand Up @@ -43,7 +43,16 @@ class Demo extends React.Component {
}

render() {
return <Transfer defaultValue={['3']} dataSource={dataSource} listStyle={{ width: '200px', height: '192px' }} defaultLeftChecked={['1']} onChange={this.handleChange} titles={['Source', 'Target']} operations={['>>', '<<']} />;
return (
<Transfer
defaultValue={['3']}
dataSource={dataSource}
listStyle={{ width: '200px', height: '192px' }}
defaultLeftChecked={['1']}
onChange={this.handleChange}
titles={[<Button key='left' type='primary'>Source</Button>, 'Target']}
operations={['>>', '<<']} />
);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/transfer/view/transfer-panel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class TransferPanel extends Component {
onMoveAll: PropTypes.func,
disabled: PropTypes.bool,
locale: PropTypes.object,
title: PropTypes.string,
title: PropTypes.node,
showSearch: PropTypes.bool,
filter: PropTypes.func,
onSearch: PropTypes.func,
Expand Down

0 comments on commit d088da9

Please sign in to comment.