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

Infinite loop error when using the transformItems prop from InstantSearch's Menu component #1292

Open
willlee17 opened this issue Feb 21, 2024 · 1 comment
Labels
needs more info This issue needs a minimal complete and verifiable example

Comments

@willlee17
Copy link

willlee17 commented Feb 21, 2024

Description
Hello!

I have a simple search app using Gatsby, Meilisearch, and Instantsearch. I'm using Meilisearch Cloud as well.
Search and all that works great. I wanted to fine tune the result being shown in the UI when filtering. InstantSearch's docs referred me to use
transformItems within the Menu component I'm using (make sure you're on InstantSearch v7 when clicking the url).

Any time I add the prop, I run into an infinite loop. Even when I'm just returning the initial results with no mutations.

<Menu attribute="optionTypes.optionValues.presentation" transformItems={(items) => { console.log("items: ", items); return items; }} />

Any insights?

Packages used:
"react-instantsearch": "^7.5.3",
"@meilisearch/instant-meilisearch": "^0.13.6",
"gatsby-plugin-meilisearch": "^0.3.1",

If applicable, add screenshots or logs to help explain your problem.

Environment (please complete the following information):

  • OS: Mac
  • Browser: Version 111.0.5563.146 (Official Build) (arm64)
  • Meilisearch version: 1.6.2 (based on the info from the Cloud)
  • instant-meilisearch version: 0.13.6
  • instantsearch.js version: 7.5.3
@curquiza
Copy link
Member

curquiza commented Mar 7, 2024

Hello @willlee17
sorry for the daly, do you have the same issue with the latest version of instant-meilisearch?
https://github.com/meilisearch/meilisearch-js-plugins/releases

@curquiza curquiza added the needs more info This issue needs a minimal complete and verifiable example label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info This issue needs a minimal complete and verifiable example
Projects
None yet
Development

No branches or pull requests

2 participants