question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[currentRefinements] clearsQuery

See original GitHub issue

Current behaviour

When clearsQuery is true, the button for clearing the refinements also clears the query.

However if there are no other refinements, the button doesn’t appear. Also the query is not considered a current refinement, therefore even though it would cleared by the button it doesn’t appear.

Proposed fix

Make the clearsQuery trigger the following changes:

  • the clear all button clears the query too (and is visible when only the query is set)
  • the query appears as a refinement

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
bobylitocommented, Sep 7, 2017

@vvo What I propose is the following: when you choose to activate clearsQuery, we should display the query. On the other hand, if clearsQuery is false we don’t display the query. This brings consistency to the feature: what you can see is what gets cleared.

1reaction
vvocommented, Sep 6, 2017

I did not quite get what you proposed. If the question is is it ok to have the query appears in refinements then I would say yes, as @fabregas4 proposed and showed us.

With that said, let’s see if anyone wants to hide the query afterwards and deal with that once it shows as a need/issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CurrentRefinements | React InstantSearch - Algolia
<CurrentRefinements // Optional parameters clearsQuery={boolean} ... The CurrentRefinements widget displays the list of currently applied refinements.
Read more >
react-instantsearch-dom | Yarn - Package Manager
Behaviour is unchanged, query will be filtered if clearsQuery prop is false. Add the index name to all the current refinements items.
Read more >
Instantsearch-itemsjs-adapter NPM | npm.io
The CurrentRefinements widget allows a user to see wich filters are apllied. Parameter, Explanation. clearsQuery, ❌, Do not set this to true, the...
Read more >
CurrentRefinements - InstantSearch specs
Widgets: Answers · Breadcrumb · ClearRefinements · Configure · CurrentRefinements · GeoSearch · HierarchicalMenu · Highlight · HitsPerPage · Hits · InfiniteHits ...
Read more >
https://raw.githubusercontent.com/samouss/flufykin...
Behaviour is unchanged, query will be filtered if clearsQuery prop is false. * Add the index name to all the current refinements items....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found