Describe the bug 馃悰
The search query is not shown in the currentRefinedValues widget when onlyListedAttributes is set to true.
To Reproduce 馃攳
Steps to reproduce the behavior:
Expected behavior 馃挱
The search query should show up in the currentRefinedValues widget even when whitelisting the other shown attributes with onlyListedAttributes: true. If not by default, we should have a way of enabling it.
_Originally posted by @stianmartinsen in https://github.com/algolia/instantsearch.js/pull/2414#issuecomment-430514274_
Thanks for reporting the issue. We can probably fix this issue by providing an attributeName to the query refinement when we create it (see below).
Yes, adding attributeName should be not a breaking change and what I do in Vue InstantSearch already. It seems like a better choice to me
Hey @stianmartinsen, the next release will contain a fix for this. It will get published in the coming days. Thank you!
Most helpful comment
Thanks for reporting the issue. We can probably fix this issue by providing an attributeName to the query refinement when we create it (see below).
https://github.com/algolia/instantsearch.js/blob/84b65210add282af5962a133a71139124a95f9b6/src/lib/utils.js#L231-L235