Skip to content

Commit

Permalink
[removed] IOS click hack, since react 0.14 handles this correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Oct 3, 2015
1 parent 3be1c86 commit f865da1
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/Multiselect.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,12 @@ var Multiselect = React.createClass({
this.refs.list && validateList(this.refs.list)
},

componentDidMount() {
// https://github.com/facebook/react/issues/1169
if( support.ios )
compat.findDOMNode(this.refs.wrapper).onClick = ()=>{}
},

componentWillReceiveProps(nextProps) {
var { data, value, valueField, searchTerm } = nextProps
, values = _.splat(value)
, current = this.state.focusedItem
, items = this.process(data, values, searchTerm)


this.setState({
processedData: items,
focusedItem: items.indexOf(current) === -1 ? items[0] : current,
Expand Down Expand Up @@ -418,7 +411,7 @@ var Multiselect = React.createClass({

e.preventDefault()
if (isOpen) this.setState({ focusedItem: next, ...nullTag })
else this.open()
else this.open()
}
else if (key === 'ArrowUp') {
var prev = focusedItem === null
Expand Down

0 comments on commit f865da1

Please sign in to comment.