Skip to content

feat(autocomplete): add multi-index support#81

Open
sarahdayan wants to merge 3 commits intofeat/headersfrom
feat/multi-index
Open

feat(autocomplete): add multi-index support#81
sarahdayan wants to merge 3 commits intofeat/headersfrom
feat/multi-index

Conversation

@sarahdayan
Copy link
Member

Summary

Autocomplete now supports multiple indices, each rendered as a separate section in the dropdown. Users can add, remove, reorder (drag-and-drop), and independently configure each index section from the toolbar.

Each index entry supports a section header, hits per page, item template mapping (auto-hidden for Query Suggestions indices), and custom search parameters. Query Suggestions indices are auto-detected and pre-configured with a "Suggestions" header.

On the runtime side, the indices parameter is transformed into proper autocomplete source configs with per-section search parameters, headers, and item templates.

Also fixes the placement: 'inside' cleanup in the middleware to only remove injected content instead of wiping the entire target element.

sarahdayan and others added 3 commits March 12, 2026 17:07
Add the ability to configure additional indices on the autocomplete
widget, each rendered as a separate section in the dropdown. Includes
index-specific hitsPerPage, search parameters, header templates, and
custom item templates. Adds the IndicesConfigField toolbar component
for managing index entries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix stale closure in removeEntry, use stable keys for drag-and-drop
reconciliation, scope draggable to grip handle, validate hitsPerPage,
avoid destructive innerHTML cleanup, and update stale test assertions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sarahdayan sarahdayan requested a review from dhayab as a code owner March 12, 2026 16:42
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.

1 participant