Skip to content

"Is in" filter doesn't allow for multi selects for relationship fields #15882

@Asheboy

Description

@Asheboy

Describe the Bug

When filtering on a relationship field using "is in" it doesn't allow you to select multiple options in the value dropdown.

Image

This issue was originally described by @stofolus in #14100, but it's been incorrectly closed, so it'd be better if we re-opened that issue instead of keeping this one.

Link to the code that reproduces this issue

https://github.com/stofolus/payload-filter-in

Reproduction Steps

Use the base template. Add the following fields to the media collection

{
  name: 'user',
  type: 'relationship',
  relationTo: 'users',
},
{
  name: 'language',
  type: 'select',
  options: ['en', 'fr', 'es', 'de', 'it', 'pt', 'ru', 'zh', 'ja', 'ko'],
},

Try to filter using "is in" on both fields. My expectation is that it should work in the same way

Which area(s) are affected?

area: ui

Environment Info

Binaries:
  Node: 22.13.0
  npm: 11.0.0
  Yarn: N/A
  pnpm: 10.8.0
Relevant Packages:
  payload: 3.58.0
  next: 15.4.4
  @payloadcms/db-mongodb: 3.58.0
  @payloadcms/email-nodemailer: 3.58.0
  @payloadcms/graphql: 3.58.0
  @payloadcms/next/utilities: 3.58.0
  @payloadcms/payload-cloud: 3.58.0
  @payloadcms/richtext-lexical: 3.58.0
  @payloadcms/translations: 3.58.0
  @payloadcms/ui/shared: 3.58.0
  react: 19.1.0
  react-dom: 19.1.0
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Tue Nov 5 00:21:55 UTC 2024
  Available memory (MB): 30891
  Available CPU cores: 16

Metadata

Metadata

Assignees

Labels

Bugarea: uiRelated to the admin panel.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions