1
+ import { ApplicationCustomizerContext } from '@microsoft/sp-application-base' ;
1
2
import IWebPartContext from "@microsoft/sp-webpart-base/lib/core/IWebPartContext" ;
2
3
import { IDropdownOption } from "office-ui-fabric-react/lib/Dropdown" ;
3
-
4
+ import { WebPartContext } from '@microsoft/sp-webpart-base' ;
4
5
import { LibsOrderBy } from "../../services/ISPService" ;
5
6
6
7
export interface IListPickerProps {
7
- /**
8
- * The web part context
9
- */
10
- context : IWebPartContext ;
11
- /**
12
- * If provided, additional class name to provide on the dropdown element.
13
- */
14
- className ?: string ;
15
- /**
16
- * Whether or not the control is disabled
17
- */
18
- disabled ?: boolean ;
19
- /**
20
- * The SharePoint BaseTemplate to filter the list options by
21
- */
22
- baseTemplate ?: number ;
23
- /**
24
- * Whether or not to include hidden lists. Default is true
25
- */
26
- includeHidden ?: boolean ;
27
- /**
28
- * How to order the lists retrieved from SharePoint
29
- */
30
- orderBy ?: LibsOrderBy ;
31
- /**
32
- * Keys of the selected item(s). If you provide this, you must maintain selection
33
- * state by observing onSelectionChanged events and passing a new value in when changed.
34
- */
35
- selectedList ?: string | string [ ] ;
36
- /**
37
- * Optional mode indicates if multi-choice selections is allowed. Default to false
38
- */
39
- multiSelect ?: boolean ;
40
- /**
41
- * The label to use
42
- */
43
- label ?: string ;
44
- /**
45
- * Input placeholder text. Displayed until option is selected.
46
- */
47
- placeHolder ?: string ;
48
- /**
49
- * Callback issues when the selected option changes
50
- */
51
- onSelectionChanged ?: ( newValue : string | string [ ] ) => void ;
8
+ /**
9
+ * The web part context
10
+ */
11
+ context : WebPartContext | ApplicationCustomizerContext ;
12
+ /**
13
+ * If provided, additional class name to provide on the dropdown element.
14
+ */
15
+ className ?: string ;
16
+ /**
17
+ * Whether or not the control is disabled
18
+ */
19
+ disabled ?: boolean ;
20
+ /**
21
+ * The SharePoint BaseTemplate to filter the list options by
22
+ */
23
+ baseTemplate ?: number ;
24
+ /**
25
+ * Whether or not to include hidden lists. Default is true
26
+ */
27
+ includeHidden ?: boolean ;
28
+ /**
29
+ * How to order the lists retrieved from SharePoint
30
+ */
31
+ orderBy ?: LibsOrderBy ;
32
+ /**
33
+ * Keys of the selected item(s). If you provide this, you must maintain selection
34
+ * state by observing onSelectionChanged events and passing a new value in when changed.
35
+ */
36
+ selectedList ?: string | string [ ] ;
37
+ /**
38
+ * Optional mode indicates if multi-choice selections is allowed. Default to false
39
+ */
40
+ multiSelect ?: boolean ;
41
+ /**
42
+ * The label to use
43
+ */
44
+ label ?: string ;
45
+ /**
46
+ * Input placeholder text. Displayed until option is selected.
47
+ */
48
+ placeHolder ?: string ;
49
+ /**
50
+ * Callback issues when the selected option changes
51
+ */
52
+ onSelectionChanged ?: ( newValue : string | string [ ] ) => void ;
52
53
}
53
54
54
55
export interface IListPickerState {
55
- /**
56
- * The options available to the listPicker
57
- */
58
- options : IDropdownOption [ ] ;
59
- /**
60
- * Whether or not the listPicker options are loading
61
- */
62
- loading : boolean ;
63
- /**
64
- * Keys of the currently selected item(s).
65
- */
66
- selectedList ?: string | string [ ] ;
67
- }
56
+ /**
57
+ * The options available to the listPicker
58
+ */
59
+ options : IDropdownOption [ ] ;
60
+ /**
61
+ * Whether or not the listPicker options are loading
62
+ */
63
+ loading : boolean ;
64
+ /**
65
+ * Keys of the currently selected item(s).
66
+ */
67
+ selectedList ?: string | string [ ] ;
68
+ }
0 commit comments