One Search Box, Zero Advanced Filters: Match Select Options by Both ID and Name
Admin UIs keep a single search input without a separate filter form, and users can filter by either a human-readable name or a machine ID. The pattern is small and eager to reuse on any table-heavy page that already knows its select options.
Global search in admin lists usually does substring matching across all fields, so a query for "Zhang San" also drags in rows whose notes mention "Zhang San's customer". The typical fix, an advanced filter form, adds extra clicks and complexity. A different solution keeps one search box but makes it option-aware.
When the user types, the box builds suggestions by scanning select-type fields and their predefined option lists. It matches each option's display name and its internal ID, and for ID matches it shows the ID in the label. Text and number fields still fall back to "contains" suggestions. The result is a merged dropdown where exact option matches appear first, and the user picks one to create an EQUAL filter condition, while the backend receives the option's ID.
The interaction reverses the classic "choose field, then choose value" flow into "type a value, then pick a field", which cuts the number of steps for well-known entries.
Putting the match logic front-end avoids extra network round trips and keeps the search itself instant, which matters when lists have many records.
This pattern works because enum fields in backend systems are usually stored as IDs while users think in names; the dual attribute is the key enabler.