reactjs


SPClientPeoplePicker is undefined using SPF'x


I am trying to create a Client side People picker control in SPF'x app using JSOM/React. I can able to create in javascript using a content editor webpart. But in SPF'x throws SPClientPeoplePicker is undefined. I am not sure when page loads it clientpeoplepicker.js will defined. What i have done is
` <div id='peoplepickerdiv'></div> private loadPeoplePicker(peoplePickerElementId:string):void {
var schema: ISPClientPeoplePickerSchema = {
PrincipalAccountType: 'User,DL,SecGroup,SPGroup',
SearchPrincipalSource: 15,
ResolvePrincipalSource: 15,
AllowMultipleValues: true,
MaximumEntitySuggestions :50,
Width: 280,
OnUserResolvedClientScript: this.onUserResolvedClientScript
}
SPClientPeoplePicker.InitializeStandalonePeoplePicker(peoplePickerElementId,null,schema); } private onUserResolvedClientScript(el: string, users: ISPClientPeoplePickerEntity[]) {
var keys = "";
var userInfo = "";
for (var i = 0; i < users.length; i++) {
var user = users[i];
keys += user.Key + ",";
for (var userProperty in user) {
userInfo += userProperty + ': ' + user[userProperty] + '<br>';
}
}
alert(keys); }`
I have already loaded the "SP.js" and "SPRuntime.js" in my config.json file externals section. Shall i need to load clientpeoplepicker.js,clientTemplates.js anywhere? If Yes where and how should i refer?
Thanks in advance.

Related Links

Drawing Polygons From GeoJSON in react-mapbox-gl
Removing sub component from React component?
React/Typescript : extending a component with additional properties
Can't get the target attributes of material-ui select react component
How to use globally installed node modules packages for multiple projects?
You may need an appropriate loader to handle this file type.eith react.js,webpack,babel
Location_Change action dispatched multiple times when navigating back using react redux router, immutablejs, and devtools
Update sibling component on mutation?
React reroute on ajax call
Webpack Dev Server with React Hot Loader
Change tab content using router
child of the component “this” value and how do I get to parent component?
Initial state Redux store - invalid prop
Mutating outer variables inside React Component
How to return existing reactElement from render
Can a Redux store lead to a memory leak?

Categories

HOME
c#
airflow
stata
reference
jquery-plugins
data-modeling
kohana
mongodb-replica-set
opengrok
responsive
exchange-transport-agents
background-image
novacode-docx
javaagents
aws-iot
concatenation
scrapy-spider
my.cnf
oracle10g
nsopenpanel
mongoose-im
hierarchical-data
restangular
qt-designer
oracle-nosql
luhn
epub
microstrategy
tunnel
campaign-monitor
motion
ngrok
blueimp
usernotifications
head
scrapinghub
infovis
flask-socketio
noise
cloudconvert
skype-bots
gige-sdk
r-commander
blackberry
chain
easy68k
mac-app-store
scikit-image
alfred
git-push
boost-bind
laterjs
pyshark
chomsky-normal-form
music-player
videoview
yfiles
dynamics-nav
kramdown
notice
page-flipping
hexagonal-tiles
pagecontrol
waterline
esri-arc-engine
unityvs
diffmerge
famous-engine
pnunit
time-frequency
switchpreference
code-smell
satisfiability
dayofweek
html5-filesystem
vbaccelerator
netbeans-plugins
code-complete
myrrix
cab
ironworker
mandelbrot
mosix
qmainwindow
junction-table
linqdatasource
qt5.1
feincms
cryptarithmetic-puzzle
openafs
custom-cursor
states
advanceddatagrid
umfpack
parallel-python
peoplepicker
backlight
functional-specifications
response-time
javah
azure-appfabric
conditional-operator
qprocess
web-search
hp-trim
mdd

Resources

Encrypt Message