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 Control - Shows wrong value in Dynamic Form when null is provided #1421

Closed
S1mpleLim3 opened this issue Jan 13, 2023 · 6 comments
Labels
status:fixed-next-drop Issue will be fixed in upcoming release. type:bug
Milestone

Comments

@S1mpleLim3
Copy link

Category

[ ] Enhancement

[X] Bug

[X] Question

Version

3.11.0

Expected / Desired Behavior / Question

When a list item has a people field empty, when same listItemId is provided to Dynamic form, peoplepicker control should be empty.

Observed Behavior

Since Dynamic form uses people picker control for user fields and if a list item has a Person field which is empty, in Dynamic form when same list item id is provided, the people picker control is prepopulated with a person "Null, Melissa". This happens because, empty person field returns field value as null but the peoplepicker control converts null to "null" (string). Which then prepopulates the field with Null, Melissa.
image
image

Here you can see, even though in list its empty, but it shows up in Form.

Steps to Reproduce

Create a list item with People field as empty, then provide same ListItemId to dynamic form.

I feel this happens because the control converts everything that sharepoint returns to String, hence null becomes "null", because i tried giving null to defaultSelectedUser of peoplePicker field and it behaves correctly.

@AJIXuMuK, @wobba, @joelfmrodrigues Can anyone look into this.

Thanks.

@ghost
Copy link

ghost commented Jan 13, 2023

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

@ghost ghost added the Needs: Triage 🔍 label Jan 13, 2023
@AJIXuMuK
Copy link
Collaborator

From IM conversation: seems like the issue appears when user's name contains Null (as on the screenshot in the description).

@S1mpleLim3 - would you be able to implement a fix and create a PR?

Thanks!

@NishkalankBezawada
Copy link
Contributor

NishkalankBezawada commented Jun 27, 2023

hello @AJIXuMuK

For this issue, do we only need to concentrate on the user email's or even the Title also? Do you think that i can test it with the below users?

image

//Nishkalank

@NishkalankBezawada
Copy link
Contributor

@S1mpleLim3 I have created a PR for this.

//Nishkalank

@joelfmrodrigues joelfmrodrigues added the status:fixed-next-drop Issue will be fixed in upcoming release. label Jul 6, 2023
@joelfmrodrigues joelfmrodrigues added this to the 3.15.0 milestone Jul 6, 2023
@joelfmrodrigues
Copy link
Collaborator

The PR to fix this issue has been merged and the fix should be in the beta release in a few minutes

@joelfmrodrigues
Copy link
Collaborator

New release just published, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:fixed-next-drop Issue will be fixed in upcoming release. type:bug
Projects
None yet
Development

No branches or pull requests

4 participants