Skip to content

Commit 0b30d63

Browse files
committed
Upd to React 0.14
1 parent ee9dada commit 0b30d63

File tree

4 files changed

+25
-22
lines changed

4 files changed

+25
-22
lines changed

examples/src/components/Tags.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import React from 'react';
1+
import React, { Component } from 'react';
22
import Select2 from '../../../src/components/Select2';
33
import '../../../src/css/select2.css';
44

5-
export default class Tags extends React.Component {
5+
export default class Tags extends Component {
66
render() {
77
return (
88
<div>

examples/src/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import React from 'react';
2+
import { render } from 'react-dom';
23
import Tags from './components/Tags';
34

4-
React.render(
5+
render(
56
<Tags />,
67
document.getElementById('app')
78
);

package.json

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-select2-wrapper",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"description": "React component for Select2",
55
"main": "lib/components/Select2.js",
66
"scripts": {
@@ -23,14 +23,15 @@
2323
"input"
2424
],
2525
"dependencies": {
26-
"react": "^0.13.3",
27-
"select2": "^4.0.0",
28-
"jquery": "^2.1.4"
26+
"jquery": "^2.1.4",
27+
"react": "^0.14.0",
28+
"react-dom": "^0.14.1",
29+
"select2": "^4.0.0"
2930
},
3031
"devDependencies": {
31-
"babel": "^5.8.9",
32-
"babel-core": "^5.4.7",
33-
"babel-eslint": "^4.0.5",
32+
"babel": "^5.8.29",
33+
"babel-core": "^5.8.29",
34+
"babel-eslint": "^4.1.1",
3435
"babel-loader": "^5.3.2",
3536
"css-loader": "^0.15.4",
3637
"eslint": "^1.0.0",

src/components/Select2.js

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
import React from 'react';
1+
import React, { Component, PropTypes } from 'react';
2+
import ReactDOM from 'react-dom';
23
import 'select2';
34

4-
export default class Select2 extends React.Component {
5+
export default class Select2 extends Component {
56
static propTypes = {
6-
data: React.PropTypes.array,
7-
events: React.PropTypes.array,
8-
options: React.PropTypes.object,
9-
multiple: React.PropTypes.bool,
10-
onOpen: React.PropTypes.func,
11-
onClose: React.PropTypes.func,
12-
onSelect: React.PropTypes.func,
13-
onChange: React.PropTypes.func,
14-
onUnselect: React.PropTypes.func,
7+
data: PropTypes.array,
8+
events: PropTypes.array,
9+
options: PropTypes.object,
10+
multiple: PropTypes.bool,
11+
onOpen: PropTypes.func,
12+
onClose: PropTypes.func,
13+
onSelect: PropTypes.func,
14+
onChange: PropTypes.func,
15+
onUnselect: PropTypes.func,
1516
}
1617

1718
static defaultProps = {
@@ -33,7 +34,7 @@ export default class Select2 extends React.Component {
3334
}
3435

3536
componentDidMount() {
36-
this.el = $(React.findDOMNode(this));
37+
this.el = $(ReactDOM.findDOMNode(this));
3738
this.el.select2(this.props.options);
3839

3940
this.props.events.forEach(event => {

0 commit comments

Comments
 (0)