Skip to content

Commit

Permalink
Merge branch 'v2' of github.com:JedWatson/react-select into v2
Browse files Browse the repository at this point in the history
  • Loading branch information
JedWatson committed May 14, 2018
2 parents 8d97e3e + b6e0045 commit cd3662b
Show file tree
Hide file tree
Showing 17 changed files with 1,157 additions and 1,115 deletions.
9 changes: 4 additions & 5 deletions src/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { DummyInput, ScrollBlock, ScrollCaptor } from './internal/index';
import {
classNames,
cleanValue,
emptyString,
isTouchCapable,
isMobileDevice,
noop,
Expand Down Expand Up @@ -543,7 +542,7 @@ export default class Select extends Component<Props, State> {
const { selectValue } = this.state;
const hasValue = this.hasValue();
const getValue = () => selectValue;
const cx = className ? classNames.bind(null, className) : emptyString;
const cx = classNames.bind(null, className);
return {
cx,
clearValue,
Expand Down Expand Up @@ -1300,7 +1299,7 @@ export default class Select extends Component<Props, State> {
// for performance, the menu options in state aren't changed when the
// focused option changes so we calculate additional props based on that
const isFocused = focusedOption === props.data;
props.innerProps.innerRef = isFocused
props.innerProps.ref = isFocused
? this.onFocusedOptionRef
: undefined;

Expand Down Expand Up @@ -1381,7 +1380,7 @@ export default class Select extends Component<Props, State> {
innerProps={{
'aria-multiselectable': isMulti,
id: this.getElementId('listbox'),
innerRef: this.onMenuRef,
ref: this.onMenuRef,
role: 'listbox',
}}
isLoading={isLoading}
Expand Down Expand Up @@ -1470,7 +1469,7 @@ export default class Select extends Component<Props, State> {
<Control
{...commonProps}
innerProps={{
innerRef: this.onControlRef,
ref: this.onControlRef,
onMouseDown: this.onControlMouseDown,
onTouchEnd: this.onControlTouchEnd,
}}
Expand Down
Loading

0 comments on commit cd3662b

Please sign in to comment.