Microsoft Graph Toolkit PeoplePicker component returns search result in the wrong order

Haiduk, Hleb 1 Reputation point
2022-10-07T08:55:55.443+00:00

I'm using PeoplePicker component from the '@microsoft/mgt-react' library in the React app.
After searching for people, the results are returned in a way that is not acceptable for the requirements.
Example: typing 'tym', I'm expecting all the first names starting with 'tym' to show first in the list and after that other results where surnames start from 'tim'.

Code:

   <PeoplePicker  
            showMax={showMax}  
            ref={ref}  
            className={styles.peoplePicker}  
            selectedPeople={data}  
            selectionChanged={selectionChanged}  
            blur={onBlur}  
            userType={UserType.user}  
          />  

Instead of it, I receive it in the following way.

enter image description here

How to reach the expected result?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,448 questions
0 comments No comments
{count} votes