Skip to content

relationship filter dropdown shows duplicate options when switching operators #15947

@zubricks

Description

@zubricks

Describe the Bug

Description
Opening a relationship field filter in the list view and switching the operator from equals to is in causes duplicate options to appear in the value dropdown

Link to the code that reproduces this issue

https://github.com/zubricks/where-builder-repro

Reproduction Steps

  1. Go to the Products list view → open a filter → select the category field with equals operator → select a value
  2. Change the operator to is in
  3. Open the value dropdown — duplicate entries appear

Which area(s) are affected?

area: core

Environment Info

Binaries:
  Node: 23.11.0
  npm: 11.4.2
  Yarn: N/A
  pnpm: 10.10.0
Relevant Packages:
  payload: 3.79.0
  next: 15.4.11
  @payloadcms/db-postgres: 3.79.0
  @payloadcms/drizzle: 3.79.0
  @payloadcms/graphql: 3.79.0
  @payloadcms/next/utilities: 3.79.0
  @payloadcms/richtext-lexical: 3.79.0
  @payloadcms/translations: 3.79.0
  @payloadcms/ui/shared: 3.79.0
  react: 19.2.1
  react-dom: 19.2.1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions