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

Toggle widget does not refine properly when numeric value is passed to values #1537

Closed
JanPetr opened this issue Nov 10, 2016 · 0 comments · Fixed by #1551
Closed

Toggle widget does not refine properly when numeric value is passed to values #1537

JanPetr opened this issue Nov 10, 2016 · 0 comments · Fixed by #1551
Assignees

Comments

@JanPetr
Copy link
Contributor

JanPetr commented Nov 10, 2016

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

What is the current behavior?
When you pass numeric value to values, eg.

values: {            
  on: -2        
}

the toggle widget stops working properly. It sends the filter in facetFilters parameter with double dot instead of sending it in numericFilters parameter with equals.
screenshot 2016-11-10 17 01 53

If the current behavior is a bug, please provide all the steps to reproduce and if possible a minimal JSFiddle example or a repository on GitHub that we can npm install and npm start.
https://jsfiddle.net/JanPetr/4rq2zs3h/2/

What is the expected behavior?
Proper filtering of results which have the exact value in given attribute. In the fiddle - only products which are on stock.

@vvo vvo added the Type: Bug label Nov 11, 2016
@vvo vvo self-assigned this Nov 15, 2016
vvo pushed a commit that referenced this issue Nov 15, 2016
fixes #1537

Using stock:-2 as a facetRefinement is supported only if you escape
the minus sign, otherwise it's considered as negative facet refinement
(remove "-2" from facets).
bobylito pushed a commit that referenced this issue Nov 15, 2016
fixes #1537

Using stock:-2 as a facetRefinement is supported only if you escape
the minus sign, otherwise it's considered as negative facet refinement
(remove "-2" from facets).
vvo pushed a commit that referenced this issue Nov 16, 2016
<a name="1.8.15"></a>
## [1.8.15](v1.8.14...v1.8.15) (2016-11-16)

### Bug Fixes

* **priceRanges:** avoid displaying solo ranges (#1544) ([ff396f0](ff396f0)), closes [#1536](#1536)
* **priceRanges:** use formatNumber in defaultTemplate (#1559) ([557a501](557a501)), closes [#1230](#1230)
* **toggle:** support negative numeric values for on/off (#1551) ([e4d88e0](e4d88e0)), closes [#1537](#1537)
* **transformData:** always call transformData (#1555) ([49bfeca](49bfeca)), closes [#1538](#1538)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants