appbaseio / appbaseio/reactivesearch

Unable to Remove Query / DynamicRangeSlider enforces value once active

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

Description

**Affected Projects**
React

**Library Version:** x.y.z
3.0.0-rc.25

**Describe the bug**
As soon as it rendered, the DynamicRangeSlider will enforce the range it displays. Items that don't have this field will not be matched anymore at all. In my case, that would be an optional memory filter for devices, while not all devices do have any memory.

The SelectedFilters component however doesn't show any hint yet, that a range query is applied.

Next I put rendering of the component under a boolean condition that I stored in state and added a toogle for that. Now as soon as I enable the toggle and the DynamicRange becomes active, the restriction is applied. When I toggle it off, the query stays restricted to that range. I first have to change another value in order to update the results without the range.

**To Reproduce**
I dont have quick sandbox example, might provide one later.

**Expected behavior**
1. If a Range is queried, always show it in `SelectedFilters`.
2. When the component is removed, remove the range from the query.

3. Idea to be more intuitive: Create a default disabled state for the DynamicRangeSlider, where the knobs are positioned at the min/max like they are now, but greyed out. Enable both when one of them has been dragged or clicked the first time, show some button that allows unselecting it again.

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.