react-autocomplete-rm
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -5,2 +5,8 @@ 'use strict'; | ||
var _react = require('react'); | ||
var _react2 = _interopRequireDefault(_react); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
@@ -10,16 +16,13 @@ | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* | ||
* @description Will render an html input with autocomplete to remote api src | ||
* @author Marc Rice | ||
* @class Autocomplete configured to load from an external json api with structure: [{key: mykey, value: myvalue}] | ||
* key is visible to the user and value is the selected value | ||
* @param String src remote url to target | ||
* @param Integer minLength | ||
* @return HTML autocompleteinput | ||
*/ | ||
//import React from 'react'; | ||
var React = require('react'); | ||
var PureRenderMixin = require('react/lib/ReactComponentWithPureRenderMixin'); | ||
/** | ||
* @description Will render an html input with autocomplete to remote api src | ||
* @author Marc Rice | ||
* @class Autocomplete configured to load from an external json api with structure: [{key: mykey, value: myvalue}] | ||
* key is visible to the user and value is the selected value | ||
* @param String src remote url to target | ||
* @param Integer minLength | ||
* @return HTML autocompleteinput | ||
*/ | ||
@@ -97,7 +100,7 @@ var Autocomplete = function (_React$Component) { | ||
return React.createElement( | ||
return _react2.default.createElement( | ||
'div', | ||
{ className: 'autocomplete-box' }, | ||
React.createElement('input', { type: 'text', onChange: this.handleChange.bind(this), className: 'autocomplete' }), | ||
React.createElement('div', { className: 'autocomplete-results' }) | ||
_react2.default.createElement('input', { type: 'text', onChange: this.handleChange.bind(this), className: 'autocomplete' }), | ||
_react2.default.createElement('div', { className: 'autocomplete-results' }) | ||
); | ||
@@ -108,4 +111,4 @@ } | ||
return Autocomplete; | ||
}(React.Component); | ||
}(_react2.default.Component); | ||
module.exports = Autocomplete; |
@@ -87,3 +87,3 @@ { | ||
}, | ||
"version": "0.0.5" | ||
"version": "0.0.6" | ||
} |
@@ -1,5 +0,2 @@ | ||
//import React from 'react'; | ||
var React = require('react'); | ||
var PureRenderMixin = require('react/lib/ReactComponentWithPureRenderMixin'); | ||
/** | ||
/* | ||
* @description Will render an html input with autocomplete to remote api src | ||
@@ -12,4 +9,8 @@ * @author Marc Rice | ||
* @return HTML autocompleteinput | ||
*/ | ||
*/ | ||
import React from 'react'; | ||
var PureRenderMixin = require('react/lib/ReactComponentWithPureRenderMixin'); | ||
class Autocomplete extends React.Component { | ||
@@ -16,0 +17,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14416
142