Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add query arg to suggestionTemplate function #29

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

andygout
Copy link
Contributor

@andygout andygout commented Mar 29, 2024

This PR modifies the templateSuggestion function to take an additional query parameter (the text which was typed into the autocomplete text input field by the user).

This means that the Origami o-autocomplete component (which relies on accessible-autocomplete) can provide a suggestionTemplate in the options when instantiating an instance of oAutocomplete which can use that query value in its callback.

This will enable a customised rendering of suggestion items whilst retaining the ability to apply highlighting (for which the query value is necessary) on the option value (or, in the scenario of it being an object, values thereof).

Dependent PRs

Dependent PRs

TODO

Release

This adds functionality in a backwards-compatible manner so I propose to release these changes as a minor version.

@andygout andygout force-pushed the add-query-arg-to-suggestion-template-function branch from 40e047b to 1960c96 Compare April 17, 2024 18:16
@notlee notlee merged commit 0cfd82c into master Apr 18, 2024
3 checks passed
@notlee notlee deleted the add-query-arg-to-suggestion-template-function branch April 18, 2024 16:16
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