Skip to content

[6.x] Fix users select dropdown not searching by email - #15128

Merged
jasonvarga merged 3 commits into
statamic:6.xfrom
edalzell:fix/users-select-search-by-email
Aug 7, 2026
Merged

[6.x] Fix users select dropdown not searching by email#15128
jasonvarga merged 3 commits into
statamic:6.xfrom
edalzell:fix/users-select-search-by-email

Conversation

@edalzell

@edalzell edalzell commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #15127. The users fieldtype's Select Dropdown mode already sends each user's email to the browser, but the dropdown's client-side search only matched against title, which falls back to email only when a user has no name set — so users with a name couldn't be found by searching their email.

Adds an optional searchKeys prop to the shared Combobox component (fuzzysort's keys option), and wires it up in the relationship select field to search title + email specifically for the users fieldtype. Other relationship types (entries, taxonomies, etc.) are unaffected.

Test plan

  • Added unit tests in SelectField.test.js covering the new searchKeys behavior
  • Verified against a real sandbox site: reproduced the bug (search by email found nothing), confirmed the fix resolves it, and confirmed name-based search still works

The users fieldtype's Select Dropdown mode already sends each user's
email to the browser, but only searched the title field client-side,
which falls back to email only when a user has no name set. Users
with a name couldn't be found by searching their email.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LBwXt1YibnzZCneXjGCqt7
@edalzell
edalzell marked this pull request as ready for review August 5, 2026 18:37
@jasonvarga
jasonvarga enabled auto-merge (squash) August 6, 2026 19:49
@jasonvarga
jasonvarga merged commit ee19482 into statamic:6.x Aug 7, 2026
19 checks passed
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.

users field type in dropdown mode can't search by email

2 participants