Skip to content

Problem with Relationship fields #54

Closed

Description

@upcase-chefs

Bug Report

When I create a collection that has a relationship field, I'm not able to select one option.

Expected Behavior

When I set a new field relationship, the dropdown let me select the option and save my object.

Current Behavior

When I create a field with relationShip, but with hasMany set to False, I'm not able to select the object from the list dropdown

Possible Solution

Fiz the react component. Looks like a little bug.

Steps to Reproduce

1.Create a new relationship field like this one:
{
name: 'cuisineRelated',
label: 'Culinária',
type: 'relationship',
relationTo: ['cuisine', 'users'],
hasMany: false,
required: false
},

  1. Go to admin and try to pick one option from the Cuisine collection
  2. The dropdown list don't allow me to select the option.

Detailed Description

I'm using the latest available Payload version from npm and my Browser is Google Chrome.

Activity

  1. jmikrut commented on Feb 3, 2021

    @jmikrut
    Member

    Hey @upcase-chefs — this is now fixed. We'll be publishing a new version of Payload for you shortly!

    Thank you for the bug report!

  2. DanRibbens commented on Feb 4, 2021

    @DanRibbens
    Contributor

    v0.2.10 is published now and includes this fix.

  3. github-actions commented on Sep 8, 2024

    @github-actions
    Contributor

    This issue has been automatically locked.
    Please open a new issue if this issue persists with any additional detail.

  4. locked as resolved and limited conversation to collaborators on Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions