11'use strict' ;
22var React = require ( 'react' ) ;
3+ var ReactDOM = require ( 'react-dom' ) ;
34var BS = require ( 'react-bootstrap' ) ;
45var Header = require ( './Header' ) ;
56var Multiselect = require ( '../../lib/index.js' ) ;
@@ -21,11 +22,6 @@ var App = React.createClass({
2122 list : [ { value :'One' , selected :true } , { value :'Two' } , { value :'Three' } , { value :'Four' , label :'Four Label' } ]
2223 } ;
2324 } ,
24- handleChange : function ( ) {
25- this . setState ( {
26- list : [ { value :'One' } , { value :'Two' } , { value :'Three' } , { value :'Four' , label :'Four Label' } ]
27- } ) ;
28- } ,
2925 render : function ( ) {
3026 return (
3127 < BS . Grid >
@@ -34,20 +30,20 @@ var App = React.createClass({
3430 < BS . Col md = { 3 } >
3531 < h2 > Demo:</ h2 >
3632 < h4 > no optgroups:</ h4 >
37- < Multiselect onChange = { this . handleChange } data = { this . state . list } multiple />
33+ < Multiselect data = { this . state . list } multiple />
3834 < h4 > with optgroups:</ h4 >
39- < Multiselect onChange = { this . handleChange } data = { this . state . groups } multiple />
35+ < Multiselect data = { this . state . groups } multiple />
4036 < h4 > single select:</ h4 >
41- < Multiselect onChange = { this . handleChange } data = { this . state . groups } />
37+ < Multiselect data = { this . state . groups } />
4238 < h4 > large list (maxHeight/buttonText):</ h4 >
43- < Multiselect onChange = { this . handleChange } data = { this . state . large } multiple
39+ < Multiselect data = { this . state . large } multiple
4440 maxHeight = { 200 }
4541 buttonText = { function ( options , select ) {
4642 return 'Long List / Custom Title!' ;
4743 } }
4844 />
4945 < h4 > buttonClass:</ h4 >
50- < Multiselect buttonClass = "btn btn-danger" onChange = { this . handleChange } data = { this . state . list } multiple />
46+ < Multiselect buttonClass = "btn btn-danger" data = { this . state . list } multiple />
5147 </ BS . Col >
5248 < BS . Col md = { 9 } >
5349 < h2 > Demo Source Code:</ h2 >
@@ -60,8 +56,4 @@ var App = React.createClass({
6056} ) ;
6157
6258// init our demo app
63- React . render ( < App /> , document . getElementById ( 'app' ) ) ;
64-
65- // we are using browserify. setup the browser.
66- exports . React = window . React = React ;
67-
59+ ReactDOM . render ( < App /> , document . getElementById ( 'app' ) ) ;
0 commit comments