@@ -22,7 +22,7 @@ export const TransferItem = {
22
22
23
23
export const TransferProps = {
24
24
prefixCls : PropTypes . string ,
25
- dataSource : PropTypes . arrayOf ( TransferItem ) ,
25
+ dataSource : PropTypes . arrayOf ( PropTypes . shape ( TransferItem ) . loose ) ,
26
26
targetKeys : PropTypes . arrayOf ( PropTypes . string ) ,
27
27
selectedKeys : PropTypes . arrayOf ( PropTypes . string ) ,
28
28
render : PropTypes . func ,
@@ -33,7 +33,7 @@ export const TransferProps = {
33
33
filterOption : PropTypes . func ,
34
34
searchPlaceholder : PropTypes . string ,
35
35
notFoundContent : PropTypes . any ,
36
- rowKey : PropTypes . string ,
36
+ rowKey : PropTypes . func ,
37
37
lazy : PropTypes . oneOfType ( [
38
38
PropTypes . object ,
39
39
PropTypes . bool ,
@@ -48,27 +48,10 @@ export const TransferLocale = {
48
48
itemsUnit : PropTypes . string ,
49
49
}
50
50
51
- const tranferProps = {
52
- prefixCls : PropTypes . string ,
53
- dataSource : PropTypes . arrayOf ( PropTypes . shape ( TransferItem ) . loose ) ,
54
- targetKeys : PropTypes . arrayOf ( PropTypes . string ) ,
55
- selectedKeys : PropTypes . arrayOf ( PropTypes . string ) ,
56
- listStyle : PropTypes . object ,
57
- render : PropTypes . func ,
58
- titles : PropTypes . arrayOf ( PropTypes . string ) ,
59
- operations : PropTypes . arrayOf ( PropTypes . string ) ,
60
- showSearch : PropTypes . bool ,
61
- filterOption : PropTypes . func ,
62
- searchPlaceholder : PropTypes . string ,
63
- notFoundContent : PropTypes . string ,
64
- rowKey : PropTypes . func ,
65
- lazy : PropTypes . oneOfType ( [ PropTypes . object , PropTypes . bool ] ) ,
66
- }
67
-
68
51
export default {
69
52
name : 'Transfer' ,
70
53
mixins : [ BaseMixin ] ,
71
- props : initDefaultProps ( tranferProps , {
54
+ props : initDefaultProps ( TransferProps , {
72
55
dataSource : [ ] ,
73
56
showSearch : false ,
74
57
} ) ,
0 commit comments