-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialize PeoplePicker with users in list item #138
Comments
Yeah, this is a known current limitation of Peoplepicker I think (even in 1.9.0) because the component lifecycle methods don't align properly with loading of defaultselectedusers. I have recently added an enhancement item for it at #135. For near term, the idea is to fix it by moving the binding from ComponentWillMount to ComponentDidMount lifecycle so that the values are ready before the people picker control is loaded. The next enhancement would be to receive props update. If you need an urgent solution below is how I have fixed it. Basically I am force updating the control on a state variable which is set after all the data fetch is done for the web part
Happy to provide more details if needed |
@AsishP , any word on when your fix will be pushed to beta? I am in dire need of a working solution... I could not get your suggested workaround to run properly. The component does not seem to re-render when state changes. Could you perhaps elaborate how you implemented your workaround? |
@mwahlia , sorry don't have an idea about the beta. Have to check with @estruyf . Regarding the workaround, below is a brief explanation of the code above. PS: It is not recommended but could use it as a short term resolution till the fix is released.
Hopefully the above makes sense. Please let me know if there are any queries, |
The PR is merged and will be available in the latest beta version. Follow this guide in order to test out a beta version: https://sharepoint.github.io/sp-dev-fx-controls-react/beta/ |
This is now available in version |
Category
[ ] Enhancement
[ ] Bug
[x] Question
Version
Please specify what version of the library you are using: [ 1.9.0 ]
If you are not using the latest release, please update and see if the issue is resolved before submitting an issue.
Question
Is there any way of populating the PeoplePicker from a list field? I have a form where I register activities and assign people to it. This works fine, but in edit mode, the PeoplePicker control will not load the registered assignees.
Have I missed something or do you have any suggestions on how to solve this?
Thanks!
The text was updated successfully, but these errors were encountered: