Skip to content

listSearchableFields does not support searching by select field labels (only values) #16322

@MeghaPurohit306

Description

@MeghaPurohit306

Describe the Bug

When using listSearchableFields in a collection, search queries only match the stored value of a select field, not the label.

In cases where label and value differ, users cannot search using the label shown in the UI, which leads to a poor admin experience.

Link to the code that reproduces this issue

#16343

Reproduction Steps

  1. Create a collection with a select field (label ≠ value)
  2. Add listSearchableFields: ['status']
  3. Insert a document with status = "active"
  4. Go to admin list view
  5. Search for "Active User"
    Expected:
    Search should match both:
  • stored value ("active")
  • displayed label ("Active User")

Which area(s) are affected?

area: ui, plugin: search

Environment Info

"payload": "3.80.0",
"@payloadcms/db-postgres": "3.80.0",
@payloadcms/next": "3.80.0",
"@payloadcms/plugin-cloud-storage": "3.80.0",
"@payloadcms/plugin-nested-docs": "3.80.0",
"@payloadcms/richtext-lexical": "3.80.0",
"@payloadcms/storage-azure": "3.80.0",
"@payloadcms/ui": "3.80.0",
"next": "15.4.11",
"react": "19.2.1",

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions