algolia / algolia/doc-onboarding

Different behaviour between React - others

Open
#12 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
8
Forks
12
PR merge metrics
No merged PRs in 30d

Description

On the React implementation when no results are found the refinements applied in the refinement list are removed. It's because we unmount the widget when there is no results. But in React InstantSearch when we unmount a widget we also remove the refinement applied with it. We can hide them in case of no results rather than unmount them completely.

**Reproduction**

- Select one or multiple values in the refinement list
- Search for a query without results → `dsdsdsds`
- Remove the search
- The refinements are gone (with React)

**InstantSearch**

![vanilla](https://user-images.githubusercontent.com/6513513/42155094-b5e84d24-7de7-11e8-9d4b-519ecf5b8fd8.gif)

**React InstantSearch**

![react](https://user-images.githubusercontent.com/6513513/42155100-b9c5581a-7de7-11e8-8597-8f134c42f101.gif)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported sequence in the React implementation: select refinement values, search for `dsdsdsds`, then clear the search. Trace the no-results path and compare it with the described InstantSearch behavior. Done means the selected refinements remain applied after the no-results state and are still present when the search is cleared.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.