@cwi/ngx-sharepoint-peoplepicker
v1.3.4
Published
Angular component wrapper to Sharepoint PeoplePicker
Downloads
116
Keywords
Readme
@cwi/ngx-sharepoint-peoplepicker
Angular component wrapper to Sharepoint PeoplePicker
The Peoplepicker component is a top abstraction above the SharePoint's peoplepicker.
<shp-peoplepicker
helperText=""
multiple=""
[initialUsers]=""
[allowedEntities]=""
(userResolved)="">
</shp-peoplepicker>
Input
- helperText?:
string
- multiple:
boolean = false
- initialUsers:
string[]
- initial users to be placed in peoplepicker. Accepts LoginName and Email (NOTE: When using initialUsers with a variable set programmatically, use *ngIf on the peoplepicker component to force the component to render only when there's value set to avoid issues.)
- allowedEntities:
string[]
- set the entity types that peoplepicker will accept. (e.g:
['User', 'SPGroup']
). All available types in https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-server/ms480323(v=office.15)
- set the entity types that peoplepicker will accept. (e.g:
Output
- userResolved:
EventEmitter<PeoplePickerResolvedEvent>
Definitions
- PeoplePickerResolvedEvent:
- pickerElementId:
string
- users:
ISPClientPeoplePickerEntity[]
- pickerElementId:
Example
<shp-peoplepicker (userResolved)="logUser($event)"></shp-peoplepicker>
logUser(event: PeoplePickerResolvedEvent): void {
console.log(event.pickerElementId); // 'shp-picker-x'
console.log(event.users); // [...]
}