-
Notifications
You must be signed in to change notification settings - Fork 332
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
feat(autocomplete-core): add insights
option to enable the Insights plugin
#1121
feat(autocomplete-core): add insights
option to enable the Insights plugin
#1121
Conversation
@@ -285,7 +286,7 @@ See: https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocom | |||
}, | |||
}); | |||
|
|||
const input = container.querySelector<HTMLInputElement>('.aa-Input'); | |||
const input = container.querySelector<HTMLInputElement>('.aa-Input')!; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to the PR but I noticed a TS error since input
can be null
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit ffff04c:
|
…hts-plugin-setup # Conflicts: # packages/autocomplete-plugin-algolia-insights/src/types/EventParams.ts
Summary
FX-2249
This PR adds an option
insights
toautocomplete-core
package to enable the Insights plugin and load the Insights library if it has not been loaded yet.Results
When creating the Autocomplete instance, the
insights
option can be used to enable the Insights plugin and load the Insights library if it has not been loaded yet. The option accepts aboolean
or the Insights plugin parameters (that will be passed down to the default plugin).