Skip to content
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

Bug in PropertyFieldPeoplePickerHost #16

Open
usaalex opened this issue Oct 5, 2017 · 0 comments
Open

Bug in PropertyFieldPeoplePickerHost #16

usaalex opened this issue Oct 5, 2017 · 0 comments

Comments

@usaalex
Copy link

usaalex commented Oct 5, 2017

After selecting a few people from WebPart properties pane some of them are not retrieved back although they are displayed correctly in the picker control.

Found bugged line (266 in PropertyFieldPeoplePickerHost.tsx)
var index: number = this.resultsPersonas.indexOf(selectedItems[selectedItems.length - 1]);
this.resultsPersonas object instance sometimes is not the same instance as in selectedItems
They look the same, but have different references. p1 object is from this.resultsPersonas and p2 is from selectedItems array.

image

I suggest changing indexOf to findIndex or filter functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant