Describe the bug
If you use array type for the valueField in the "relation" widget of collection, it shows an error screen when you access to the collection record in the admin dashboard.
To Reproduce
Steps to reproduce the behavior. For example:
Expected behavior
I am not quite sure.
Screenshots

Applicable Versions:
CMS configuration
- label: "Agent"
name: "agent"
widget: "relation"
collection: "agents"
searchFields: ["agent_name", "direct_phone", "email_address"]
valueField: ["direct_phone"]
displayFields: ["agent_name", "direct_phone", "email_address"]
I believe that the valueField parameter only allows for a single field, so the input wouldn't have to be in an array. Try changing valueField: ["direct_phone"] to simply: valueField: "direct_phone".
Thank you. It works.
I think that it would be nice if someone that has and access to this doc page could kindly add a note on it: https://www.netlifycms.org/docs/widgets/#relation
@shumiyao you can definitely do a PR to improve the docs, that would be awesome!
Where is the branch for the doc?
Master branch does not seem to have the Default widgets section.
The file is here.
Thank you @WJXHenry , @talves
I have opened a PR.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
closing as stale
Most helpful comment
Thank you @WJXHenry , @talves
I have opened a PR.