-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Pass transformItems to SearchBar #8461
Comments
cc @shortcuts |
Hi, you can't use non-serializable items in In order to pass callbacks to theme components, please swizzle the component instead, and pass the callback directly as a prop. This is why you need to swizzle |
Thanks @Josh-Cena! I was able to get it working by ejecting However, I was thinking that a better solution would be to wrap the ejected component and pass my Wdyt @Josh-Cena? If you think this makes sense, I am fine with making a PR. |
Sounds good to me :) |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
One of Algolia config options should be transformItems function which can filter/reorder the incoming search results prior to displaying to the user.
However, it seems like this function is not being picked up when defined in Docusaurus config at all.
Reproducible demo
https://stackblitz.com/edit/github-mfcf4x?file=docusaurus.config.js
Steps to reproduce
docusaurus.config.js
:Expected behavior
Search hits should be logged to the console.
Actual behavior
Search hits are not logged to the console.
Your environment
Self-service
The text was updated successfully, but these errors were encountered: