sp-dev-fx-controls-react
sp-dev-fx-controls-react copied to clipboard
People picker issue when try to search by full name but works with upn
Hello i am using last version of the package but i have a problem with PeoplePicker it suggest when i search by upn but it will not suggest if i search by full name ..
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Thank you for submitting your first issue to this project.
Hello @Igli1994
Could you please share the code synopsis on how you have defined PeoplePicker control.
Thanks, Nishkalank
Hello @NishkalankBezawada, I am also facing the same issue. Please find below, the implementation in my code. It works fine when I try to search by upn (Akshat.agarwal) or "agarwal, akshat" but it fails to provide any results when I search for "Akshat Agarwal"
Thanks!
Hi @akshataggrwal & @Igli1994,
I tried on my side with the provided code snippet, without encountering any trouble, whether I search by UPN or full name (both first and last name).
May I ask to both of you to check the following:
- Does the native People Picker in a Person field behaves correctly if you try to search by full name? (even if I know that it's not querying the same API, just to ensure)
- What's the network trace when you're querying the PnP Controls' People Picker with both working and malfunctioning input?
- Meaning what's inside the
_api/SP.UI.ApplicationPages.ClientPeoplePickerWebServiceInterface.clientPeoplePickerSearchUser
call, both payload and return
- Meaning what's inside the
Hi @michaelmaillot,
Upon inspecting the OOB SPO people picker field(which work correctly), it appears to be using the same API(/_api/SP.UI.ApplicationPages.ClientPeoplePickerWebServiceInterface.clientPeoplePickerSearchUser), with the inclusion of an additional parameter called 'UseSubstrateSearch.' and that is the only difference between the two queries.
However, I've found limited documentation on this parameter.
Related - https://github.com/pnp/sp-dev-fx-controls-react/issues/1534
As I'm not able to repro your issue and as I agree that there's no documentation around this API, may I suggest you to run the Controls locally, udpate the searchTenant method by including this UseSubstrateSearch
and test the PeoplePicker control with the ControlsTest
webpart, provided in the repo.
Hi @michaelmaillot,
Apologies for the delayed response.
I tested the web part locally by including this property, and it now searches for users based on full names as well.
Thanks!
Hello,
FYI I've submitted a PR with the ability to enable substrate search.
Great! Thanks for the update @michaelmaillot.
Is it reasonable to expect this fix to be included in the next release?
Thanks & Regards Akshat Agarwal
We'll try to 😉
Hello,
Linked PR has been merged, the feature should be soon available in next beta release.
Thanks again everyone for raising & taking time to dig into this one!