From 20138185d7998ecc2849654be047af2b93f54321 Mon Sep 17 00:00:00 2001 From: Eugene Kuzmenko Date: Fri, 16 Oct 2015 21:33:56 +0300 Subject: [PATCH] [removed] handleResize --- build/Combo.js | 41 ++++++++++++++++++----------------------- development/App.js | 2 +- development/script.js | 4 ++-- docs/Combo.html | 3 ++- lib/Combo.js | 40 +++++++++++++++------------------------- package.json | 2 +- spec/ComboSpec.js | 20 ++++---------------- 7 files changed, 43 insertions(+), 69 deletions(-) diff --git a/build/Combo.js b/build/Combo.js index 9587632..f8716e4 100644 --- a/build/Combo.js +++ b/build/Combo.js @@ -22,8 +22,6 @@ var _reactLibReactWithAddons2 = _interopRequireDefault(_reactLibReactWithAddons) var _reactDom = require('react-dom'); -var _reactDom2 = _interopRequireDefault(_reactDom); - var _reactBootstrap = require('react-bootstrap'); var _lodashCollectionMap = require('lodash/collection/map'); @@ -39,6 +37,10 @@ var _lodashFunctionDebounce = require('lodash/function/debounce'); var _lodashFunctionDebounce2 = _interopRequireDefault(_lodashFunctionDebounce); var caret = _reactLibReactWithAddons2['default'].createElement('span', { className: 'caret' }); +var _React$PropTypes = _reactLibReactWithAddons2['default'].PropTypes; +var func = _React$PropTypes.func; +var object = _React$PropTypes.object; +var string = _React$PropTypes.string; var uid = 0; @@ -49,8 +51,9 @@ var uid = 0; * @param {Object} props - A props config * @example * import {Combo} from 'react-bootstrap-combobox'; + * import {render} from 'react-dom'; * - * ReactDOM.render(, document.getElementById('app')); +render(, document.getElementById('app')); diff --git a/docs/Combo.html b/docs/Combo.html index 3c97b37..929ef7d 100644 --- a/docs/Combo.html +++ b/docs/Combo.html @@ -165,8 +165,9 @@
Parameters:
Example
import {Combo} from 'react-bootstrap-combobox';
+import {render} from 'react-dom';
 
-ReactDOM.render(<Combo items={{
+render(<Combo items={{
   // keys must be unique
   a: {label: 'first item', header: true}, // any combination of props supported by MenuItem
   b: 'second item',                       // same as {label: 'second item'}
diff --git a/lib/Combo.js b/lib/Combo.js
index bdcafd0..cd69887 100644
--- a/lib/Combo.js
+++ b/lib/Combo.js
@@ -1,13 +1,14 @@
 /* @flow */
 
 import React from 'react/lib/ReactWithAddons';
-import ReactDOM from 'react-dom';
+import {findDOMNode} from 'react-dom';
 import {Button, Dropdown, MenuItem} from 'react-bootstrap';
 import map from 'lodash/collection/map';
 import isString from 'lodash/lang/isString';
 import debounce from 'lodash/function/debounce';
 
-const caret = ;
+const caret = ,
+    {func, object, string} = React.PropTypes;
 
 let uid = 0;
 
@@ -18,8 +19,9 @@ let uid = 0;
  * @param {Object} props - A props config
  * @example
  * import {Combo} from 'react-bootstrap-combobox';
+ * import {render} from 'react-dom';
  *
- * ReactDOM.render(