superdesk-ui-framework 3.0.1-beta.3 → 3.0.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/styles/_sd-tag-input.scss +201 -296
- package/app/styles/components/_list-item.scss +13 -1
- package/app/styles/components/_sd-photo-preview.scss +1 -1
- package/app/styles/design-tokens/_new-colors.scss +1 -1
- package/app/styles/form-elements/_forms-general.scss +22 -7
- package/app/styles/form-elements/_inputs.scss +131 -54
- package/app-typescript/components/Badge.tsx +3 -2
- package/app-typescript/components/DatePicker.tsx +40 -52
- package/app-typescript/components/DurationInput.tsx +306 -0
- package/app-typescript/components/Form/InputBase.tsx +85 -0
- package/app-typescript/components/Form/InputNew.tsx +105 -0
- package/app-typescript/components/Form/InputWrapper.tsx +79 -0
- package/app-typescript/components/Form/index.tsx +3 -0
- package/app-typescript/components/Input.tsx +28 -45
- package/app-typescript/components/Label.tsx +49 -10
- package/app-typescript/components/Layouts/Layout.tsx +1 -1
- package/app-typescript/components/Lists/ContentList.tsx +4 -4
- package/app-typescript/components/MultiSelect.tsx +37 -50
- package/app-typescript/components/Navigation/BottomNav.tsx +3 -2
- package/app-typescript/components/Select.tsx +23 -41
- package/app-typescript/components/SelectWithTemplate.tsx +32 -7
- package/app-typescript/components/TimePicker.tsx +48 -16
- package/app-typescript/components/TreeSelect.tsx +423 -195
- package/app-typescript/index.ts +3 -1
- package/dist/examples.bundle.js +16398 -15334
- package/dist/playgrounds/react-playgrounds/CoreLayout.tsx +64 -54
- package/dist/playgrounds/react-playgrounds/RundownEditor.tsx +24 -16
- package/dist/playgrounds/react-playgrounds/TestGround.tsx +76 -1
- package/dist/playgrounds/react-playgrounds/components/Layout.tsx +1 -1
- package/dist/react/Badges.tsx +18 -0
- package/dist/react/ContentList.tsx +15 -9
- package/dist/react/DatePicker.tsx +21 -1
- package/dist/react/DurationInput.tsx +104 -0
- package/dist/react/Index.tsx +5 -0
- package/dist/react/Inputs.tsx +153 -2
- package/dist/react/Labels.tsx +51 -1
- package/dist/react/MultiSelect.tsx +4 -1
- package/dist/react/SelectWithTemplate.tsx +6 -1
- package/dist/react/TableList.tsx +22 -44
- package/dist/react/TimePicker.tsx +16 -8
- package/dist/react/TreeSelect.tsx +301 -48
- package/dist/react/tree-select/TreeSelect.tsx +273 -0
- package/dist/react/tree-select/example-1.tsx +71 -0
- package/dist/react/tree-select/example-2.tsx +59 -0
- package/dist/superdesk-ui.bundle.css +411 -370
- package/dist/superdesk-ui.bundle.js +15554 -14493
- package/dist/vendor.bundle.js +27 -27
- package/examples/pages/playgrounds/react-playgrounds/CoreLayout.tsx +64 -54
- package/examples/pages/playgrounds/react-playgrounds/RundownEditor.tsx +24 -16
- package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +76 -1
- package/examples/pages/playgrounds/react-playgrounds/components/Layout.tsx +1 -1
- package/examples/pages/react/Badges.tsx +18 -0
- package/examples/pages/react/ContentList.tsx +15 -9
- package/examples/pages/react/DatePicker.tsx +21 -1
- package/examples/pages/react/DurationInput.tsx +104 -0
- package/examples/pages/react/Index.tsx +5 -0
- package/examples/pages/react/Inputs.tsx +153 -2
- package/examples/pages/react/Labels.tsx +51 -1
- package/examples/pages/react/MultiSelect.tsx +4 -1
- package/examples/pages/react/SelectWithTemplate.tsx +6 -1
- package/examples/pages/react/TableList.tsx +22 -44
- package/examples/pages/react/TimePicker.tsx +16 -8
- package/examples/pages/react/TreeSelect.tsx +301 -48
- package/examples/pages/react/tree-select/TreeSelect.tsx +273 -0
- package/examples/pages/react/tree-select/example-1.tsx +71 -0
- package/examples/pages/react/tree-select/example-2.tsx +59 -0
- package/package.json +2 -1
- package/react/components/Badge.d.ts +1 -0
- package/react/components/Badge.js +2 -2
- package/react/components/DatePicker.d.ts +1 -0
- package/react/components/DatePicker.js +6 -22
- package/react/components/DurationInput.d.ts +38 -0
- package/react/components/DurationInput.js +271 -0
- package/react/components/Form/InputBase.d.ts +42 -0
- package/react/components/Form/InputBase.js +72 -0
- package/react/components/Form/InputNew.d.ts +45 -0
- package/react/components/Form/InputNew.js +73 -0
- package/react/components/Form/InputWrapper.d.ts +28 -0
- package/react/components/Form/InputWrapper.js +91 -0
- package/react/components/Form/index.d.ts +3 -0
- package/react/components/Form/index.js +7 -1
- package/react/components/Input.js +5 -34
- package/react/components/Label.d.ts +1 -0
- package/react/components/Label.js +18 -2
- package/react/components/Layouts/Layout.js +1 -1
- package/react/components/Lists/ContentList.d.ts +45 -0
- package/react/components/Lists/ContentList.js +85 -0
- package/react/components/Navigation/BottomNav.d.ts +1 -0
- package/react/components/Navigation/BottomNav.js +2 -2
- package/react/components/Select.d.ts +1 -1
- package/react/components/Select.js +4 -26
- package/react/components/SelectWithTemplate.d.ts +11 -1
- package/react/components/SelectWithTemplate.js +19 -10
- package/react/components/TimePicker.d.ts +15 -2
- package/react/components/TimePicker.js +15 -4
- package/react/components/TreeSelect.d.ts +75 -0
- package/react/components/TreeSelect.js +448 -0
- package/react/index.d.ts +3 -0
- package/react/index.js +8 -3
@@ -2,72 +2,143 @@ import * as React from 'react';
|
|
2
2
|
import * as Markup from '../../js/react';
|
3
3
|
import { PropsList, Prop } from '../../../app-typescript';
|
4
4
|
import { MultiSelect } from '../../../app-typescript/components/MultiSelect';
|
5
|
-
import { TreeSelect } from '../../../app-typescript/components/TreeSelect';
|
5
|
+
import { ITreeNode, TreeSelect } from '../../../app-typescript/components/TreeSelect';
|
6
6
|
|
7
7
|
interface IState {
|
8
8
|
value: any;
|
9
9
|
value2: any;
|
10
10
|
options: any;
|
11
11
|
options2: any;
|
12
|
+
inputValue: string;
|
12
13
|
}
|
13
14
|
|
14
15
|
let itemArr = [
|
15
16
|
{
|
16
|
-
|
17
|
-
|
17
|
+
value: 'Category1',
|
18
|
+
children: [
|
18
19
|
{
|
19
|
-
|
20
|
-
|
21
|
-
{
|
20
|
+
value: 'Sub-Category1',
|
21
|
+
children: [
|
22
|
+
{value: 'Item10'}
|
22
23
|
]
|
23
24
|
},
|
24
25
|
{
|
25
|
-
|
26
|
-
|
27
|
-
{
|
26
|
+
value: 'Sub-Category2',
|
27
|
+
children: [
|
28
|
+
{value: 'Item11'}
|
28
29
|
]
|
29
30
|
}
|
30
31
|
]
|
31
32
|
},
|
32
33
|
{
|
33
|
-
|
34
|
-
|
34
|
+
value: 'Category2',
|
35
|
+
children: [
|
35
36
|
{
|
36
|
-
|
37
|
+
value: 'Sub-Category3'
|
37
38
|
},
|
38
39
|
{
|
39
|
-
|
40
|
+
value: 'Sub-Category4'
|
40
41
|
}
|
41
42
|
]
|
42
43
|
},
|
43
44
|
{
|
44
|
-
|
45
|
-
|
45
|
+
value: 'Category3',
|
46
|
+
children: [
|
46
47
|
{
|
47
|
-
|
48
|
+
value: 'Sub-Category5'
|
48
49
|
},
|
49
50
|
{
|
50
|
-
|
51
|
+
value: 'Sub-Category6'
|
51
52
|
}
|
52
53
|
]
|
53
54
|
},
|
54
55
|
]
|
55
56
|
|
57
|
+
let itemArr2 = [
|
58
|
+
{
|
59
|
+
value: {name: 'Category1'},
|
60
|
+
children: [
|
61
|
+
{
|
62
|
+
value: {name: 'Sub-category1'},
|
63
|
+
children: [
|
64
|
+
{value: {name: 'Item5'}}
|
65
|
+
]
|
66
|
+
},
|
67
|
+
{
|
68
|
+
value: {name: 'Sub-category2'},
|
69
|
+
children: [
|
70
|
+
{value: {name: 'Item7'}}
|
71
|
+
]
|
72
|
+
}
|
73
|
+
]
|
74
|
+
},
|
75
|
+
{
|
76
|
+
value: {name: 'Category2'},
|
77
|
+
children: [
|
78
|
+
{
|
79
|
+
value: {name: 'Item8'}
|
80
|
+
},
|
81
|
+
{
|
82
|
+
value: {name: 'Item9'}
|
83
|
+
}
|
84
|
+
]
|
85
|
+
},
|
86
|
+
{
|
87
|
+
value: {name: 'Category3'},
|
88
|
+
children: [
|
89
|
+
{
|
90
|
+
value: {name: 'Item10'}
|
91
|
+
},
|
92
|
+
{
|
93
|
+
value: {name: 'Item11'}
|
94
|
+
}
|
95
|
+
]
|
96
|
+
},
|
97
|
+
]
|
98
|
+
|
99
|
+
const source = [
|
100
|
+
{
|
101
|
+
'name': 'Article (news)',
|
102
|
+
'qcode': 'Article',
|
103
|
+
},
|
104
|
+
{
|
105
|
+
'name': 'Sidebar',
|
106
|
+
'qcode': 'Sidebar',
|
107
|
+
},
|
108
|
+
{
|
109
|
+
'name': 'Factbox',
|
110
|
+
'qcode': 'Factbox',
|
111
|
+
},
|
112
|
+
];
|
113
|
+
|
114
|
+
function searchOptions(
|
115
|
+
term: string,
|
116
|
+
callback: (res: Array<ITreeNode<{name: string; qcode: string;}>>) => void,
|
117
|
+
): void {
|
118
|
+
setTimeout(() => {
|
119
|
+
callback(
|
120
|
+
source
|
121
|
+
.filter((item) => item.name.toLocaleLowerCase().includes(term.toLocaleLowerCase()))
|
122
|
+
.map((item) => ({value: item})),
|
123
|
+
);
|
124
|
+
}, 1000);
|
125
|
+
}
|
126
|
+
|
56
127
|
export class TreeSelectDocs extends React.Component<{}, IState> {
|
57
128
|
constructor(props) {
|
58
129
|
super(props);
|
59
130
|
this.state = {
|
60
131
|
value: [],
|
61
132
|
value2: [],
|
62
|
-
options:
|
63
|
-
options2:
|
133
|
+
options: itemArr2,
|
134
|
+
options2: itemArr2,
|
135
|
+
inputValue: ''
|
64
136
|
}
|
65
137
|
|
66
138
|
this.handleChange = this.handleChange.bind(this);
|
67
139
|
}
|
68
140
|
|
69
141
|
handleChange(e, option) {
|
70
|
-
|
71
142
|
if(option.item) {
|
72
143
|
e.stopPropagation();
|
73
144
|
e.preventDefault();
|
@@ -81,7 +152,7 @@ export class TreeSelectDocs extends React.Component<{}, IState> {
|
|
81
152
|
render() {
|
82
153
|
return (
|
83
154
|
<section className='docs-page__container'>
|
84
|
-
<h2 className='docs-page__h2'>TreeSelect</h2>
|
155
|
+
<h2 className='docs-page__h2'>TreeSelect (in progress)</h2>
|
85
156
|
|
86
157
|
<Markup.ReactMarkupCodePreview>{`
|
87
158
|
<TreeSelect
|
@@ -99,11 +170,20 @@ export class TreeSelectDocs extends React.Component<{}, IState> {
|
|
99
170
|
<div className='docs-page__content-row docs-page__content-row--no-margin'>
|
100
171
|
<div className='form__row'>
|
101
172
|
<TreeSelect
|
102
|
-
|
103
|
-
getLabel={
|
104
|
-
|
173
|
+
getId={(item) => item.name}
|
174
|
+
getLabel={(item) => item.name}
|
175
|
+
getOptions={() => itemArr2}
|
176
|
+
value={[{name: 'Item1'}, {name: 'Item2'}]}
|
105
177
|
selectBranchWithChildren={true}
|
106
|
-
onChange={() =>
|
178
|
+
onChange={(e) => console.log(e)}
|
179
|
+
allowMultiple
|
180
|
+
kind={'synchronous'}
|
181
|
+
fullWidth
|
182
|
+
info={'Info Message'}
|
183
|
+
error={'Error Message'}
|
184
|
+
required
|
185
|
+
label={'TreeSelect Label'}
|
186
|
+
singleLevelSearch
|
107
187
|
/>
|
108
188
|
</div>
|
109
189
|
</div>
|
@@ -111,30 +191,83 @@ export class TreeSelectDocs extends React.Component<{}, IState> {
|
|
111
191
|
|
112
192
|
<Markup.ReactMarkupCode>{`
|
113
193
|
<TreeSelect
|
114
|
-
|
115
|
-
getLabel={
|
116
|
-
|
194
|
+
getId={(item) => item.name}
|
195
|
+
getLabel={(item) => item.name}
|
196
|
+
getOptions={() => {
|
197
|
+
return itemArr2
|
198
|
+
}}
|
199
|
+
value={[{name: 'Item1'}, {name: 'Item2'}]}
|
117
200
|
selectBranchWithChildren={true}
|
118
|
-
onChange={() =>
|
201
|
+
onChange={(e) => console.log(e)}
|
202
|
+
allowMultiple
|
203
|
+
kind={'synchronous'}
|
204
|
+
fullWidth
|
205
|
+
info={'Info Message'}
|
206
|
+
error={'Error Message'}
|
207
|
+
required
|
208
|
+
label={'TreeSelect Label'}
|
209
|
+
/>
|
210
|
+
`}</Markup.ReactMarkupCode>
|
211
|
+
|
212
|
+
</Markup.ReactMarkup>
|
213
|
+
|
214
|
+
<p className='docs-page__paragraph'>Asynchronous mode in TreeSelect component.</p>
|
215
|
+
<Markup.ReactMarkup>
|
216
|
+
<Markup.ReactMarkupPreview>
|
217
|
+
<div className='docs-page__content-row docs-page__content-row--no-margin'>
|
218
|
+
<div className='form__row'>
|
219
|
+
<TreeSelect
|
220
|
+
kind="asynchronous"
|
221
|
+
searchOptions={searchOptions}
|
222
|
+
value={this.state.value}
|
223
|
+
onChange={(val) => {
|
224
|
+
this.setState({value: val});
|
225
|
+
}}
|
226
|
+
getLabel={({name}) => name}
|
227
|
+
getId={({qcode}) => qcode}
|
228
|
+
selectBranchWithChildren={false}
|
229
|
+
optionTemplate={(item) => <span style={{color: 'blue'}}>{item.name}</span>}
|
230
|
+
allowMultiple={true}
|
231
|
+
/>
|
232
|
+
</div>
|
233
|
+
</div>
|
234
|
+
</Markup.ReactMarkupPreview>
|
235
|
+
|
236
|
+
<Markup.ReactMarkupCode>{`
|
237
|
+
<TreeSelect
|
238
|
+
kind="asynchronous"
|
239
|
+
searchOptions={searchOptions}
|
240
|
+
value={this.state.value}
|
241
|
+
onChange={(val) => {
|
242
|
+
this.setState({value: val});
|
243
|
+
}}
|
244
|
+
getLabel={({name}) => name}
|
245
|
+
getId={({qcode}) => qcode}
|
246
|
+
selectBranchWithChildren={false}
|
247
|
+
optionTemplate={(item) => <span style={{color: 'blue'}}>{item.name}</span>}
|
248
|
+
allowMultiple={true}
|
119
249
|
/>
|
120
250
|
`}</Markup.ReactMarkupCode>
|
121
251
|
|
122
252
|
</Markup.ReactMarkup>
|
253
|
+
|
123
254
|
<p className='docs-page__paragraph'>TreeSelect with custom template.</p>
|
124
255
|
<Markup.ReactMarkup>
|
125
256
|
<Markup.ReactMarkupPreview>
|
126
257
|
<div className='docs-page__content-row docs-page__content-row--no-margin'>
|
127
258
|
<div className='form__row'>
|
128
259
|
<TreeSelect
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
260
|
+
getId={(item) => item.name}
|
261
|
+
getLabel={(item) => item.name}
|
262
|
+
placeholder='Select one'
|
263
|
+
getOptions={() => this.state.options}
|
264
|
+
kind={'synchronous'}
|
265
|
+
onChange={(e) => console.log(e)}
|
133
266
|
optionTemplate={(item: any) => {
|
134
|
-
return <div>Label: {item.
|
267
|
+
return <div>Label: {item.name}</div>
|
135
268
|
}}
|
136
269
|
valueTemplate={(item: any) => {
|
137
|
-
return <span>Label: {item.
|
270
|
+
return <span>Label: {item.name}</span>
|
138
271
|
}}
|
139
272
|
/>
|
140
273
|
</div>
|
@@ -143,16 +276,18 @@ export class TreeSelectDocs extends React.Component<{}, IState> {
|
|
143
276
|
|
144
277
|
<Markup.ReactMarkupCode>{`
|
145
278
|
<TreeSelect
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
279
|
+
getId={(item) => item.name}
|
280
|
+
getLabel={(item) => item.name}
|
281
|
+
value={[{name: 'Item4'}, {name: 'Item10'}]}
|
282
|
+
getOptions={() => this.state.options}
|
283
|
+
kind={'synchronous'}
|
284
|
+
onChange={(e) => console.log(e)}
|
150
285
|
optionTemplate={(item: any) => {
|
151
|
-
return <div>Label: {item.
|
286
|
+
return <div>Label: {item.name}</div>
|
152
287
|
}}
|
153
288
|
valueTemplate={(item: any) => {
|
154
|
-
return <span>Label: {item.
|
155
|
-
}}
|
289
|
+
return <span>Label: {item.name}</span>
|
290
|
+
}}
|
156
291
|
/>
|
157
292
|
`}</Markup.ReactMarkupCode>
|
158
293
|
|
@@ -161,18 +296,136 @@ export class TreeSelectDocs extends React.Component<{}, IState> {
|
|
161
296
|
<h3 className="docs-page__h3">Props</h3>
|
162
297
|
<PropsList>
|
163
298
|
<Prop name='value' isRequired={false} type='Array<T>' default='/' description='Value of the component.'/>
|
164
|
-
<Prop name='
|
165
|
-
<Prop name='
|
166
|
-
<Prop name='getMultilevelArray' isRequired={true} type='string' default='/' description='Name of the children array of an option.'/>
|
299
|
+
<Prop name='getOptions' isRequired={true} type='Function' default='/' description='An array of selectitems to display as the available options.'/>
|
300
|
+
<Prop name='kind' isRequired={true} type='synchronous | asynchronous' default='/' description='Type of TreeSelect component.'/>
|
167
301
|
<Prop name='width' isRequired={false} type='medium | full-width (100%)' default='100%' description='Dropdown width.'/>
|
168
302
|
<Prop name='selectBranchWithChildren' isRequired={false} type='boolean' default='false' description='When specified, select branch with children is enabled.'/>
|
169
303
|
<Prop name='readonly' isRequired={false} type='boolean' default='false' description='When specified, component changes are not enabled.'/>
|
170
|
-
<Prop name='
|
171
|
-
<Prop name='
|
172
|
-
<Prop name='
|
304
|
+
<Prop name='loading' isRequired={false} type='boolean' default='false' description='Adds a loading indicator in dropdown.'/>
|
305
|
+
<Prop name='getLabel' isRequired={true} type='Function' default='/' description='Callback to invoke when value changes.'/>
|
306
|
+
<Prop name='getId' isRequired={true} type='Function' default='/' description='Callback to invoke when value changes.'/>
|
307
|
+
<Prop name='valueTemplate' isRequired={false} type='Function' default='/' description='Function that gets an item in the value and returns the content for it.'/>
|
308
|
+
<Prop name='optionTemplate' isRequired={false} type='Function' default='/' description='Function that gets the option and returns the content for it.'/>
|
309
|
+
<Prop name='searchOptions' isRequired={false} type='Function' default='/' description='The function will be called when a search is initiated from UI in asynchronous mode.'/>
|
310
|
+
<Prop name='onChange' isRequired={true} type='Function' default='/' description='Callback to invoke when value changes.'/>
|
311
|
+
</PropsList>
|
312
|
+
|
313
|
+
<p className='docs-page__paragraph'>synchronous:</p>
|
314
|
+
<PropsList>
|
315
|
+
<Prop name='getOptions' isRequired={false} type='Function' default='/' description='An array of selectitems to display as the available options.'/>
|
316
|
+
</PropsList>
|
317
|
+
|
318
|
+
<p className='docs-page__paragraph'>asynchronous:</p>
|
319
|
+
<PropsList>
|
320
|
+
<Prop name='getOptions' isRequired={false} type='Function' default='/' description='An array of selectitems to display as the available options.'/>
|
321
|
+
<Prop name='searchOptions' isRequired={false} type='Function' default='/' description='function will be called when a search is initiated from UI.'/>
|
173
322
|
</PropsList>
|
174
323
|
|
175
324
|
</section>
|
176
325
|
)
|
177
326
|
}
|
178
327
|
}
|
328
|
+
|
329
|
+
// import React from 'react';
|
330
|
+
// import {ITreeNode, TreeSelect} from './TreeSelect';
|
331
|
+
|
332
|
+
// type IProps = {};
|
333
|
+
|
334
|
+
// interface IVocabularyItem {
|
335
|
+
// qcode: string;
|
336
|
+
// name: string;
|
337
|
+
// }
|
338
|
+
|
339
|
+
// interface IState {
|
340
|
+
// value: Array<IVocabularyItem>;
|
341
|
+
// }
|
342
|
+
|
343
|
+
// const source: Array<ITreeNode<IVocabularyItem>> = [
|
344
|
+
// {
|
345
|
+
// value: {
|
346
|
+
// 'name': 'Article (news)',
|
347
|
+
// 'qcode': 'Article',
|
348
|
+
// },
|
349
|
+
// children: [
|
350
|
+
// {
|
351
|
+
// value: {
|
352
|
+
// 'name': 'Test 1',
|
353
|
+
// 'qcode': 'test-1',
|
354
|
+
// },
|
355
|
+
// }
|
356
|
+
// ],
|
357
|
+
// },
|
358
|
+
// {
|
359
|
+
// value: {
|
360
|
+
// 'name': 'Sidebar',
|
361
|
+
// 'qcode': 'Sidebar',
|
362
|
+
// },
|
363
|
+
// children: [
|
364
|
+
// {
|
365
|
+
// value: {
|
366
|
+
// 'name': 'Test 2',
|
367
|
+
// 'qcode': 'test-2',
|
368
|
+
// },
|
369
|
+
// }
|
370
|
+
// ],
|
371
|
+
// },
|
372
|
+
// {
|
373
|
+
// value: {
|
374
|
+
// 'name': 'Factbox',
|
375
|
+
// 'qcode': 'Factbox',
|
376
|
+
// },
|
377
|
+
// children: [
|
378
|
+
// {
|
379
|
+
// value: {
|
380
|
+
// 'name': 'Test 3',
|
381
|
+
// 'qcode': 'test-3',
|
382
|
+
// },
|
383
|
+
// }
|
384
|
+
// ],
|
385
|
+
// }
|
386
|
+
// ];
|
387
|
+
|
388
|
+
// export class TreeSelectDocs extends React.PureComponent<IProps, IState> {
|
389
|
+
// constructor(props: IProps) {
|
390
|
+
// super(props);
|
391
|
+
// this.state = {
|
392
|
+
// value: [],
|
393
|
+
// };
|
394
|
+
// }
|
395
|
+
// render() {
|
396
|
+
// return (
|
397
|
+
// // <TreeSelect
|
398
|
+
// // kind="synchronous"
|
399
|
+
// // getOptions={() => source}
|
400
|
+
// // value={this.state.value}
|
401
|
+
// // onChange={(val) => {
|
402
|
+
// // this.setState({value: val});
|
403
|
+
// // }}
|
404
|
+
// // getId={(item) => item.name}
|
405
|
+
// // getLabel={(item) => item.name}
|
406
|
+
// // selectBranchWithChildren={false}
|
407
|
+
// // optionTemplate={(item) => <span style={{color: 'blue'}}>{item.name}</span>}
|
408
|
+
// // allowMultiple={true}
|
409
|
+
|
410
|
+
// // />
|
411
|
+
|
412
|
+
// <TreeSelect
|
413
|
+
// getId={(item) => item.name}
|
414
|
+
// getLabel={(item) => item.name}
|
415
|
+
// getOptions={() => {
|
416
|
+
// return source
|
417
|
+
// }}
|
418
|
+
// //value={[{name: 'Item1'}, {name: 'Item2'}]}
|
419
|
+
// //selectBranchWithChildren={true}
|
420
|
+
// onChange={(e) => console.log(e)}
|
421
|
+
// allowMultiple
|
422
|
+
// kind={'synchronous'}
|
423
|
+
// fullWidth
|
424
|
+
// info={'Info Message'}
|
425
|
+
// error={'Error Message'}
|
426
|
+
// required
|
427
|
+
// label={'TreeSelect Label'}
|
428
|
+
// />
|
429
|
+
// );
|
430
|
+
// }
|
431
|
+
// }
|