diff --git a/components/transfer/demo/basic.md b/components/transfer/demo/basic.md
index bfc737f0fb..f01d4750f4 100644
--- a/components/transfer/demo/basic.md
+++ b/components/transfer/demo/basic.md
@@ -7,23 +7,9 @@
---
````jsx
-import { Transfer, Button, Menu, Dropdown, Icon } from 'antd';
+import { Transfer, Button } from 'antd';
const container = document.getElementById('components-transfer-demo-basic');
-const menu =
-
+ { headerDom ?
+ { headerDom }
+
:
{this.renderCheckbox({
prefixCls: 'ant-tree',
checked: globalCheckStatus === 'all',
checkPart: globalCheckStatus === 'part',
checkable:
})} {dataSource.length} 条{config.title}
-
+
}
-
-
- {dataSource.map((item)=> {
- return -
-
-
- {extraRender(item)}
-
- ;})}
-
+ { layout ? layout :
+
+
+ {dataSource.map((item)=> {
+ return -
+
+
;})}
+
+
}
- { footer ?
- { footer }
+ { footerDom ?
+ { footerDom }
: null }
);
}
@@ -107,15 +112,20 @@ class TransferList extends Component {
TransferList.defaultProps = {
prefixCls: 'ant-transfer-list',
dataSource: [],
+ defaultDataSource: [],
+ handleFilter: noop,
+ handleSelect: noop,
onChange: noop,
- footer: [],
- extraRender: noop,
+ //advanced
+ header: noop,
+ footer: noop,
+ customLayout: noop,
};
TransferList.propTypes = {
prefixCls: PropTypes.string,
dataSource: PropTypes.array,
- footer: PropTypes.array,
+ footer: PropTypes.func,
searchPlaceholder: PropTypes.string,
handleFilter: PropTypes.func,
handleSelect: PropTypes.func,