1 |
|
2 |
|
3 | import * as React from 'react';
|
4 | import CommonProps from '../util';
|
5 |
|
6 | interface HTMLAttributesWeak extends React.HTMLAttributes<HTMLElement> {
|
7 | defaultValue?: any;
|
8 | onChange?: any;
|
9 | }
|
10 |
|
11 | export interface TransferProps extends HTMLAttributesWeak, CommonProps {
|
12 | |
13 |
|
14 |
|
15 | mode?: 'normal' | 'simple';
|
16 |
|
17 | |
18 |
|
19 |
|
20 | dataSource?: Array<any>;
|
21 |
|
22 | |
23 |
|
24 |
|
25 | value?: Array<any>;
|
26 |
|
27 | |
28 |
|
29 |
|
30 | defaultValue?: Array<any>;
|
31 |
|
32 | |
33 |
|
34 |
|
35 | onChange?: (value: Array<any>, data: Array<any>, extra: {}) => void;
|
36 |
|
37 | |
38 |
|
39 |
|
40 | disabled?: boolean;
|
41 |
|
42 | |
43 |
|
44 |
|
45 | leftDisabled?: boolean;
|
46 |
|
47 | |
48 |
|
49 |
|
50 | rightDisabled?: boolean;
|
51 |
|
52 | |
53 |
|
54 |
|
55 | itemRender?: (data: any) => React.ReactNode;
|
56 |
|
57 | |
58 |
|
59 |
|
60 | showSearch?: boolean | boolean[];
|
61 |
|
62 | |
63 |
|
64 |
|
65 | searchProps?: Record<string, any> | Record<string, any>[];
|
66 |
|
67 | |
68 |
|
69 |
|
70 | filter?: (searchedValue: string, data: any) => boolean;
|
71 |
|
72 | |
73 |
|
74 |
|
75 | onSearch?: (searchedValue: string, position: string) => void;
|
76 |
|
77 | |
78 |
|
79 |
|
80 | useVirtual?: boolean,
|
81 |
|
82 | |
83 |
|
84 |
|
85 | searchPlaceholder?: string;
|
86 |
|
87 | |
88 |
|
89 |
|
90 | notFoundContent?: React.ReactNode | React.ReactNode[];
|
91 |
|
92 | |
93 |
|
94 |
|
95 | titles?: Array<any>;
|
96 |
|
97 | |
98 |
|
99 |
|
100 | operations?: Array<any>;
|
101 |
|
102 | |
103 |
|
104 |
|
105 | defaultLeftChecked?: Array<any>;
|
106 |
|
107 | |
108 |
|
109 |
|
110 | defaultRightChecked?: Array<any>;
|
111 |
|
112 | |
113 |
|
114 |
|
115 | listClassName?: string;
|
116 |
|
117 | |
118 |
|
119 |
|
120 | listStyle?: React.CSSProperties;
|
121 |
|
122 | |
123 |
|
124 |
|
125 | sortable?: boolean;
|
126 |
|
127 | |
128 |
|
129 |
|
130 | onSort?: (value: Array<any>, position: string) => void;
|
131 |
|
132 | |
133 |
|
134 |
|
135 | id?: string;
|
136 | }
|
137 |
|
138 | export default class Transfer extends React.Component<TransferProps, any> {}
|