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
- Create a collection with a select field (label ≠ value)
- Add
listSearchableFields: ['status']
- Insert a document with status = "active"
- Go to admin list view
- 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",
Describe the Bug
When using
listSearchableFieldsin 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
listSearchableFields: ['status']Expected:
Search should match both:
Which area(s) are affected?
area: ui, plugin: search
Environment Info