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

Fix: click arrow should be no-op when disabled select #95

Merged
merged 2 commits into from
Jun 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ React.render(c, container);
|notFoundContent | specify content to show when no result matches. | String | 'Not Found' |
|placeholder | select placeholder | React Node | |
|showSearch | whether show search input in single mode | bool | true |
|showArrow | whether show arrow in single mode | bool | true |
|allowClear | whether allowClear | bool | false |
|tags | when tagging is enabled the user can select from pre-existing options or create a new tag by picking the first choice, which is what the user has typed into the search box so far. | bool | false |
|maxTagTextLength | max tag text length to show | number | - |
Expand Down
4 changes: 3 additions & 1 deletion src/Select.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,9 @@ const Select = React.createClass({

onArrowClick(e) {
e.stopPropagation();
this.setOpenState(!this.state.open, true);
if (!this.props.disabled) {
this.setOpenState(!this.state.open, true);
}
},

onPlaceholderClick() {
Expand Down