payload icon indicating copy to clipboard operation
payload copied to clipboard

Same groups in ReactSelect for relationship fields

Open dkirchhof opened this issue 2 years ago • 4 comments

Link to reproduction

No response

Describe the Bug

ReactSelect is used for relationship fields. It will be populated with OptionGroups. Unfortunately there are multiple groups with the same label.

For example I have a relation to a pages collection:

  1. There will be a group with a "pages" header and a single document (the selected one).
  2. There will be another group also with a "pages" header and 10 documents.
  3. I think after scrolling, the next lazy loaded pages (10 again) will be pushed to a new "pages" group.

image

To Reproduce

  1. Create a collection with a relationship field (relation to a single or multiple collections).
  2. Edit the collection and open the relation dropdown.

Payload Version

2.11.2

Adapters and Plugins

db-mongodb 1.4.2

dkirchhof avatar Mar 05 '24 17:03 dkirchhof

Probably it could be a feature. Don't know. A client asks to hide the headers of the groups completely if it is a relationship to a single collection.

dkirchhof avatar Mar 05 '24 17:03 dkirchhof

I have the same issue. An additional category title is added when you add a new item to the select box.

image

When the select dropdown is filled initially, there is only one category title afterwards.

image

mfilteau avatar Jun 25 '24 03:06 mfilteau

This issue was automatically closed due to lack of activity. If this issue is still relevant against the latest codebase, please create a new issue.

github-actions[bot] avatar Dec 06 '24 15:12 github-actions[bot]

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

github-actions[bot] avatar Dec 08 '24 04:12 github-actions[bot]