Skip to content

Conversation

@mondaychen
Copy link
Contributor

It will be useful to allow {value: "some value", label: "some label", disabled: true}.

I noticed that this is already partially implemented. A disabled option gets a classname is-disabled (with proper css style). And you can no longer select it by mouse click. However you can still select it using keyboard. This PR will fix it. (as described in #274)

@mondaychen
Copy link
Contributor Author

Should I commit the the changes of the dist files? I got more diff than expected. Seems that I'm using some newer version npm packages.

@JedWatson
Copy link
Owner

Great - thanks @mondaychen. No need to commit the dist files, they're generated when I publish releases.

JedWatson added a commit that referenced this pull request Aug 5, 2015
@JedWatson JedWatson merged commit 3cbc0e4 into JedWatson:master Aug 5, 2015
bruderstein added a commit to bruderstein/react-select that referenced this pull request Aug 6, 2015
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 added a commit to bruderstein/react-select that referenced this pull request Aug 8, 2015
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.
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