Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change select behaviour in SelectPopover #4715

Merged
merged 1 commit into from
Apr 11, 2018

Conversation

edmundoa
Copy link
Contributor

When SelectPopover is used as a single-option select, clicking on a selected option will deselect it (aka toggle it's select status). That behaviour is not consistent with other selects we use, and also doesn't provide much value (since we already have an option to clear the selection).

This PR changes that behaviour by treating a click on a selected option in the same way as a click in a not-selected option.

On multiselects, it is still possible to deselect a single selected option by clicking on it.

- On a single select, clicking on a selected option will not clear the
  selected item
- On a multiselect, clicking on a selected option will deselect it,
  while keeping the status of other selected items
Copy link
Contributor

@mariussturm mariussturm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Will merge after tests are green.

@mariussturm mariussturm merged commit 3822aec into master Apr 11, 2018
@mariussturm mariussturm deleted the select-toggle-multiselect branch April 11, 2018 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants