Vue-instantsearch: Stats component is not always display

Created on 17 Oct 2017  路  3Comments  路  Source: algolia/vue-instantsearch

Do you want to request a feature or report a bug?
Bug

Bug: What is the current behavior?

The Stats component is not always visible even if the totalResults is greater than 0.

  • on initial load the Stats component is not visible ('10,000' > 0 => false)
  • search for He
  • it will be now visible ('444' > 0 => true)

https://codepen.io/anon/pen/BwGGwE?editors=1010#0

Bug: What is the expected behavior?

The Stats component should always be visible when totalResults is greater than 0.

Bug: What browsers are impacted? Which versions?

All.

Bug: What is the proposed solution?

The totalResults computed property pass to the view is converted to a string with toLocaleString(). So the condition for display the content is not always predictable.

We should pass two variables to the view, one for the display the count and the other for the condition.

What is the version you are using? Always use the latest one before opening a bug issue.

1.2.0

bug

All 3 comments

Thanks for reporting this @samouss will fix it in the hour.

Looks like we went a little bit to fast @ehayman 馃槀

This is now fixed in 1.2.1 馃帀
Thanks again @samouss

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joshangell picture joshangell  路  6Comments

chamby picture chamby  路  3Comments

rayrutjes picture rayrutjes  路  3Comments

intrepidws picture intrepidws  路  5Comments

matthewmnewman picture matthewmnewman  路  6Comments