Skip to content

Conversation

@bruderstein
Copy link
Collaborator

Previously (following PR #346) a disabled option would show up in the list, until searching, then it would disappear.
This commit changes that behaviour, so that the option is still shown (when it matches the search), but still cannot be selected.

Test added.

This is a very subjective PR, so it'd be good to get a few opinions on this - I find it feels weird when you click the arrow to show the states, type 'a', and 'Alabama' disappears. If the caller didn't want to display the option, they'd have removed it from the options, not set it to disabled, but that's just my opinion.

Previously (following PR JedWatson#346) a disabled option would
show up in the list, until searching, then it would disappear
This commit changes that behaviour, so that the option
is still shown (when it matches the search), but still
cannot be selected.

Test added.
@bruderstein bruderstein force-pushed the show-disabled-options-in-search branch from 534dcc3 to 818f8a5 Compare August 8, 2015 12:24
@JedWatson
Copy link
Owner

I'm inclined to agree with you, @bruderstein. I think that if the option shouldn't be visible, don't include it. If it's included but disabled there must be some information that is intended to convey, so it should remain during search. To do otherwise is confusing.

I'm happy to merge this. If there's a compelling reason to support removing disabled options during searches we could always introduce a prop to control this behaviour (not necessary though, IMO).

JedWatson added a commit that referenced this pull request Aug 8, 2015
Disabled options appear in the search results
@JedWatson JedWatson merged commit 5dcb7a0 into JedWatson:master Aug 8, 2015
@bruderstein bruderstein deleted the show-disabled-options-in-search branch August 9, 2015 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants