Closed woudsma closed 1 year ago
The facet and its value should be encoded separately, not the entire string, maybe the wording in the docs could be improved to show that (Each facet and its value must
instead of Each facet filter string must
maybe)
@Haroenv Thanks for your quick reply! That wasn't clear for me from reading the docs, thanks for your explanation.
I'd suggest something like this:
Both the
attribute
andvalue
in each facet filter must be URL-encoded and separated by a:
, such as,"discount:10%25"
.
Please feel free to close this issue!
I've updated the docs with your clarification, thanks!
Should I use
encodeURIComponent
on the filters that are sent with theviewedFilters
event?The docs mention this:
The example confuses me, since
encodeURIComponent('discount:10%')
becomesdiscount%3A10%25
, notdiscount:10%25
. Can I assume that this is an error in the docs?