Skip to content

live dropdown search honors regex, extensive and field options - #1563

Merged
jbtronics merged 5 commits into
Part-DB:masterfrom
samyk:typeahead-search-options
Oct 10, 2026
Merged

jbtronics merged 5 commits into
Part-DB:masterfrom
samyk:typeahead-search-options

Conversation

@samyk

@samyk samyk commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

The navbar/homepage dropdown only did a fixed substring match on name/description/category/footprint; regex and extensive matching needed Enter and a full results page.

When regex or extensive matching is checked in the search options, the dropdown now sends the checked options to the typeahead endpoint, which runs the same PartSearchFilter as the search page (selected fields, regex, extensive, wildcard). With neither checked the request and the existing fast autocomplete search are unchanged.

A half-typed regex (e.g. lm() answers an empty list instead of an error, highlighting follows the regex or the individual words, and toggling an option re-runs the dropdown for the text already typed. The request-to-filter code moves from PartListsController to PartSearchFilter::fromRequest() so both places share it.

The navbar/homepage dropdown only did a fixed substring match on
name/description/category/footprint; regex and extensive matching needed
Enter and a full results page.

When regex or extensive matching is checked in the search options, the
dropdown now sends the checked options to the typeahead endpoint, which
runs the same PartSearchFilter as the search page (selected fields,
regex, extensive, wildcard). With neither checked the request and the
existing fast autocomplete search are unchanged.

A half-typed regex (e.g. "lm(") answers an empty list instead of an
error, highlighting follows the regex or the individual words, and
toggling an option re-runs the dropdown for the text already typed.
The request-to-filter code moves from PartListsController to
PartSearchFilter::fromRequest() so both places share it.
@jbtronics
jbtronics merged commit 066e122 into Part-DB:master Oct 10, 2026
15 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.

2 participants