Skip to content

Commit 7aa3832

Browse files
committed
Various fixes for the list picker
1 parent 4b6d3e3 commit 7aa3832

File tree

6 files changed

+295
-253
lines changed

6 files changed

+295
-253
lines changed
Lines changed: 60 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,68 @@
1+
import { ApplicationCustomizerContext } from '@microsoft/sp-application-base';
12
import IWebPartContext from "@microsoft/sp-webpart-base/lib/core/IWebPartContext";
23
import { IDropdownOption } from "office-ui-fabric-react/lib/Dropdown";
3-
4+
import { WebPartContext } from '@microsoft/sp-webpart-base';
45
import { LibsOrderBy } from "../../services/ISPService";
56

67
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;
5253
}
5354

5455
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

Comments
 (0)