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

PeoplePicker component filtering people with same names #1603

Closed
Matej4386 opened this issue Jul 27, 2023 · 3 comments
Closed

PeoplePicker component filtering people with same names #1603

Matej4386 opened this issue Jul 27, 2023 · 3 comments
Labels
status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug

Comments

@Matej4386
Copy link

Matej4386 commented Jul 27, 2023

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:
/**

  • Checks if list contains the person
  • @param persona
  • @param personas
    */
    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:
/**

  • Checks if list contains the person
  • @param persona
  • @param personas
    */
    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;
    }
@ghost
Copy link

ghost commented Jul 27, 2023

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@NishkalankBezawada
Copy link
Contributor

Hello @Matej4386 , I have created a new PR for this as #1620

Thanks,
Nishkalank

@michaelmaillot michaelmaillot added status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug and removed Needs: Triage 🔍 labels Sep 6, 2023
@michaelmaillot
Copy link
Collaborator

Closing as fixed in version 3.16.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug
Projects
None yet
Development

No branches or pull requests

3 participants