appbaseio / appbaseio/reactivesearch

ToggleButton should not unselect active item - There should always be an item active

Open
#1,736 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
4.9k
Forks
478
PR merge metrics
No merged PRs in 30d

Description

**Affected Projects**
VueJS

**Is your feature request related to a problem? Please describe.**
ToggleButton unselects value when clicked on active item

**Describe the solution you'd like**
ToggleButton should not unselect value when clicked on active item. It should only change the active item when clicked on that active item

**Describe alternatives you've considered**
Not considered. But could be a custom reactive component.

**Additional context**
Could be a prop to have different behavior in case you want to continue to offer this option in both ways

**Steps to reproduce**
1. Initial state:
![image](https://user-images.githubusercontent.com/8817968/124781296-932dfe80-df43-11eb-9779-1692dab69aa7.png)

2. Change active item:
![image](https://user-images.githubusercontent.com/8817968/124781324-99bc7600-df43-11eb-9c24-31482aa46f7c.png)

3. Click active item (same item as step 2) - Undesired behavior
![image](https://user-images.githubusercontent.com/8817968/124781368-a345de00-df43-11eb-9548-a5a17b75432b.png)

4. Click active item (same item as step 2) - Desired behavior / Stays the same
![image](https://user-images.githubusercontent.com/8817968/124781324-99bc7600-df43-11eb-9c24-31482aa46f7c.png)

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.