Forum Discussion
Cardinal_Night
Nov 19, 2019Brass Contributor
How to set the default for a pnp.sp people picker
I want a pnp.sp people picker to auto populate with the logged in user. Here's the render and the people picker: <PeoplePicker
context={this.props.context}
personSelectionLimit={1}
grou...
O365Developer
Nov 19, 2019Brass Contributor
Hi,
I feel you are setting the state of the
LoggedInUserPPDefaultItems
in the
_loggedInUser
method which will be called onChange.
So it wont get prepopulated ,when you load the form ,However is it getting populated when you focus or doing a key press ,as that will trigger onchange.
Remember setState is async