-
Notifications
You must be signed in to change notification settings - Fork 380
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
DynamicForm - Error on save when clearing person from Person or Group field and leaving it blank. #1578
Comments
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. |
I found a solution, will be creating a PR on this by tomorrow. |
Hello @Fantasticles I have created a new pull request resolving the reported issue. Below is the solution, Solution for Issue #1578When the user is updating the people picker column, for a single user, Dynamic form is throwing error while saving the list item. The issue occurs at method The object formed with an empty user and is being submitted to update the item
And the error is caught here,
By validating the null check as below, the issue is resolved.
I have also corrected a spelling mistake at from, 'val.newValue.lenght'
To, 'val.newValue.length' as below.
Thanks, |
@NishkalankBezawada Thanks heaps for your great work! (Relieved that it wasn't something I was doing wrong) |
Thanks both. |
New release just published, closing |
Thank you for reporting an issue, suggesting an enhancement, or asking a question. We appreciate your feedback - to help the team understand your
needs please complete the below template to ensure we have the details to help. Thanks!
Please check out the documentation to see if your question is already addressed there. This will help us ensure our documentation is up to date.
Category
[ ] Enhancement
[x] Bug
[ ] Question
Version
Please specify what version of the library you are using: [ 3.14.0 (also tried latest beta) ]
If you are not using the latest release, please update and see if the issue is resolved before submitting an issue.
Expected / Desired Behavior / Question
When removing a person from a "Person or Group" field with 'Allow multiple selections' set to no it should let me save.
Observed Behavior
When clearing the contents of a "Person or Group" field and when 'Allow multiple selections' is set to 'No' on clicking 'Save' the following error pops up:
Error making HttpClient request in queryable [400] ::> {"odata.error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"A node of type 'StartArray' was read from the JSON reader when trying to read a value of a property; however, a 'PrimitiveValue' or 'StartObject' node was expected."}}}
It is only happening on the "Person or Group" field and if I allow multiple selections on that field it works correctly. This is happening for every web part and form customizer I have created that uses DynamicForm with a "Person or Group" field. If the field has always been empty it saves fine, it's only when there is a person in that field and then that person is removed and the field is blank and saved again.
Steps to Reproduce
As soon as the "Person or Group" fields setting is set to not allow multiple selections and then the field is left blank when it previously wasn't, on save it will produce the error. Tested on web parts and field customizers, on lists migrated from on premises SharePoint and fresh lists created in SharePoint online.
Thanks!
The text was updated successfully, but these errors were encountered: