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

allItems template shouldn't be available in infiniteHits #2543

Closed
jvreeken opened this issue Oct 31, 2017 · 3 comments
Closed

allItems template shouldn't be available in infiniteHits #2543

jvreeken opened this issue Oct 31, 2017 · 3 comments

Comments

@jvreeken
Copy link

Hits allows for the allItems template which allows for greater customization of the templates, for example inside tables and so forth...

When the allItems template is used with infiniteHits, its doesn't give any error, but instead of adding the newly loaded items, it replaces everything with the new page of results.

@Haroenv
Copy link
Contributor

Haroenv commented Nov 1, 2017

Thanks for making an issue, feel free to read more in #2519

duplicate of #2519

@Haroenv Haroenv closed this as completed Nov 1, 2017
@bobylito
Copy link
Contributor

bobylito commented Nov 1, 2017

When the allItems template is used with infiniteHits, its doesn't give any error, but instead of adding the newly loaded items, it replaces everything with the new page of results.

The fact that you can use the allItems is a bug :/ https://community.algolia.com/instantsearch.js/v2/widgets/infiniteHits.html#struct-InfiniteHitsTemplates

@bobylito bobylito reopened this Nov 1, 2017
@bobylito bobylito changed the title Infinite Hits with allItems template allItems template shouldn't be available in infiniteHits Nov 1, 2017
@Haroenv
Copy link
Contributor

Haroenv commented Nov 1, 2017

Oh that’s right, I’m sorry, I read this as a duplicate

bobylito pushed a commit that referenced this issue May 29, 2018
The infinite hits widget is based internally on the hits widget which
accepts the allItems template. However this template is not usable for
the purpose of the infinite hits widget.

In order to prevent users from using this buggy and yet accepted option
this PR generates a exception if we detect this particular template.
bobylito pushed a commit that referenced this issue May 29, 2018
The infinite hits widget is based internally on the hits widget which
accepts the allItems template. However this template is not usable for
the purpose of the infinite hits widget.

In order to prevent users from using this buggy and yet accepted option
this PR generates a exception if we detect this particular template.

Fix #2543
bobylito added a commit that referenced this issue May 29, 2018
The infinite hits widget is based internally on the hits widget which
accepts the allItems template. However this template is not usable for
the purpose of the infinite hits widget.

In order to prevent users from using this buggy and yet accepted option
this PR generates a exception if we detect this particular template.

Fix #2543
bobylito pushed a commit that referenced this issue May 29, 2018
<a name=2.7.6></a>
## [2.7.6](v2.7.5...v2.7.6) (2018-05-29)

### Bug Fixes

* **connectConfigure:** ensure we do not extend  ([#2945](#2945)) ([fdb4a7a](fdb4a7a))
* **infinite-hits:** fix [#2543](#2543) ([#2948](#2948)) ([bbf9f8f](bbf9f8f))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants