PeoplePicker component filtering people with same names #1603
Labels
status:working-on-it
Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail.
type:bug
Category
[x ] Enhancement
Version
Please specify what version of the library you are using: [ 2.10 but it is in new version also ]
Expected / Desired Behavior / Question
PeoplePicker should filter selected person not by name
Observed Behavior
PeoplePicker - after selecting person 1, second person is filtered - they have same names
Problem:
/**
*/
private listContainsPersona = (persona: IPersonaProps, personas: IPersonaProps[]): boolean => {
if (!personas || !personas.length || personas.length === 0) {
return false;
}
return personas.filter(item => item.text === persona.text).length > 0;
}
Resolution:
/**
*/
private listContainsPersona = (persona: IPersonaProps, personas: IPersonaProps[]): boolean => {
if (!personas || !personas.length || personas.length === 0) {
return false;
}
return personas.filter(item => item.id === persona.id).length > 0;
}
The text was updated successfully, but these errors were encountered: