fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

PeoplePicker/BasePicker

Open iliesalex89 opened this issue 9 years ago • 6 comments

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:)

iliesalex89 avatar Feb 15 '17 13:02 iliesalex89

I think I just reported the same issue (#1047). Feel free to close mine.

martellaj avatar Feb 20 '17 22:02 martellaj

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.

joschect avatar Feb 23 '17 01:02 joschect

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.

iliesalex89 avatar Feb 23 '17 14:02 iliesalex89

any update on this, I'm facing the same issue?

russgove avatar May 01 '17 16:05 russgove

Yes, same here, I need the default items to be updated :-(

djmrky avatar May 28 '17 21:05 djmrky

Hi, we haven't made progress on this yet. I'll see what I can do.

joschect avatar May 30 '17 18:05 joschect