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

Only show clear results x when there's input to clear #684

Closed
bronzehedwick opened this issue Oct 23, 2019 · 3 comments · Fixed by #744
Closed

Only show clear results x when there's input to clear #684

bronzehedwick opened this issue Oct 23, 2019 · 3 comments · Fixed by #744
Labels
enhancement Pull request that improves existing functionality

Comments

@bronzehedwick
Copy link

As a usability enhancement, I propose only having the clear results "x" button for single selects only become visible/accessible once there's an option chosen to clear.

This should help reduce confusion/clutter around the x when no option is selected.

@jshjohnson jshjohnson added the enhancement Pull request that improves existing functionality label Oct 24, 2019
@tinovyatkin
Copy link
Contributor

tinovyatkin commented Oct 25, 2019

Do you mean this 'X'?
Screenshot 2019-10-24 at 22 21 05

but this is exactly how it works now...

@bronzehedwick
Copy link
Author

Yes, that's the X I'm referring to.

The current behavior is different from what I'm describing.

Right now, the X is always visible. I'm proposing only showing the X when a selection has been made.

@bronzehedwick
Copy link
Author

Clarification: this behavior I'm describing only happens when there's a placeholder value set. If there is no placeholder value, the "x" button is not visible when there is no selection.

bronzehedwick pushed a commit to bronzehedwick/Choices that referenced this issue Nov 7, 2019
In some cases, the remove item X button is not hidden when there is no
selection made from the dropdown. This is not as usable, since there's
no item to clear, hence an effective noop.

The condition I saw seeing this issue arise is in single selects with
a placeholder value, a selection has been made, and then cleared: the
button HTML remains.

To fix, add some styles to hide the button if the select doesn't have a
value selected, in this case keying off of it's parents `data-value`
property.

fixes Choices-js#684
bronzehedwick pushed a commit to bronzehedwick/Choices that referenced this issue Nov 7, 2019
In some cases, the remove item X button is not hidden when there is no
selection made from the dropdown. This is not as usable, since there's
no item to clear, hence an effective noop.

The condition I saw seeing this issue arise is in single selects with
a placeholder value, a selection has been made, and then cleared: the
button HTML remains.

To fix, add some styles to hide the button if the select doesn't have a
value selected, in this case keying off of it's parents `data-value`
property.

fixes Choices-js#684
jshjohnson pushed a commit that referenced this issue Nov 12, 2019
In some cases, the remove item X button is not hidden when there is no
selection made from the dropdown. This is not as usable, since there's
no item to clear, hence an effective noop.

The condition I saw seeing this issue arise is in single selects with
a placeholder value, a selection has been made, and then cleared: the
button HTML remains.

To fix, add some styles to hide the button if the select doesn't have a
value selected, in this case keying off of it's parents `data-value`
property.

fixes #684
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Pull request that improves existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants