Skip to content

fix(ui): prevent duplicate options in relationship filter dropdown#16042

Open
salahqasm wants to merge 1 commit intopayloadcms:mainfrom
salahqasm:main
Open

fix(ui): prevent duplicate options in relationship filter dropdown#16042
salahqasm wants to merge 1 commit intopayloadcms:mainfrom
salahqasm:main

Conversation

@salahqasm
Copy link
Copy Markdown

@salahqasm salahqasm commented Mar 23, 2026

What?
Fix duplicate options appearing in the relationship filter dropdown (WhereBuilder) when a value is already selected and the dropdown is reopened — specifically when using condition operator "equals".

Why?
optionsReducer used option.id for deduplication, but options are shaped as { label , value } where the value is the id.

How?
changed optionsReducer from option.id to option.value


Before:
https://github.com/user-attachments/assets/8442e8f5-b37b-4354-95cd-89152a934e2d

After:
https://github.com/user-attachments/assets/b5a88151-284e-4a0b-9532-2ca10d0919e8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant