PeoplePicker/BasePicker
Bug Report
- Package version(s): 1.7.x
Describe the issue:
I'm trying to use PeoplePicker inside a form and in many cases, the form is initialized with edit/default values only after the components are instantiated. in the current implementation of BasePicker, i see that the defaultSelectedItems are used or considered only in the constructor and not on render or componentWillReceiveprops. I don't know if this the desired behaviour or not. I think it is strange to not be able to set defaultSelectedItems after rendering the component for example. Let me know please if this is an issue or a feature? Thanks:)
I think I just reported the same issue (#1047). Feel free to close mine.
Hi @iliesalex89 @martellaj ,
This is working as designed. When created we didn't consider that the picker might need to be a controlled component. We could make it so that default items controlls the current items, or give another property, much like input has value. I'll assign this to myself and look into it.
Thanks a lot. I also thought that the idea with default items that control current items will be very helpful. if it is helpful for someone, for the moment a very quick workaround for me was to use both Normal and Compact people picker and when I have default values and the form is pristine, I load the compact one. For any other situation, I use the normal one.
any update on this, I'm facing the same issue?
Yes, same here, I need the default items to be updated :-(
Hi, we haven't made progress on this yet. I'll see what I can do.