appbaseio / appbaseio/reactivesearch

Mismatch between URL and internal state breaks back button behavior

Open
#1,034 0 comments 0 reactions 1 assignee Claimed by @bietkul View on GitHub
bug
Dominant language
JavaScript
Stars
4.9k
Forks
478
PR merge metrics
No merged PRs in 30d

Description

**Affected Projects**

Web

**Library Version:** 3.0.0-rc19

Also whatever runs on https://opensource.appbase.io/reactivesearch/demos/gitxplore/

**Describe the bug**

There is a mismatch between the URL params and the component's internal state. The effect is that after applying a few filters, you can't set them to the previous value with the browser back button.

**To Reproduce**

Steps to reproduce the behavior:

1. Go to https://opensource.appbase.io/reactivesearch/demos/gitxplore/
2. Select Java and Ruby
3. Increase minimum stars to some value
4. Use browser back button (this should set minimum stars back to 0)
5. Use browser back button again, see that it doesn't do anything to the Java/Ruby selection

**Expected behavior**

Pressing back deselects the languages in reverse order in which they were added.

**Screenshots**

![ScreenRecording2019-07-04at1](https://user-images.githubusercontent.com/878512/60681414-71e73300-9e8f-11e9-9afb-225ea429e517.gif)

**Desktop (please complete the following information):**
- OS: MacOS Mojave
- Chrome
- Version 75

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.