Socket
Socket
Sign inDemoInstall

react-autocomplete-rm

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.8 to 0.0.9

36

build/autocomplete.js

@@ -5,22 +5,20 @@ 'use strict';

var _react = require('react');
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var _react2 = _interopRequireDefault(_react);
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/*
* @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
*/
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
var React = require('react');
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
*/
var Autocomplete = function (_React$Component) {

@@ -97,7 +95,7 @@ _inherits(Autocomplete, _React$Component);

return _react2.default.createElement(
return React.createElement(
'div',
{ className: 'autocomplete-box' },
_react2.default.createElement('input', { type: 'text', onChange: this.handleChange.bind(this), className: 'autocomplete' }),
_react2.default.createElement('div', { className: 'autocomplete-results' })
React.createElement('input', { type: 'text', onChange: this.handleChange.bind(this), className: 'autocomplete' }),
React.createElement('div', { className: 'autocomplete-results' })
);

@@ -108,4 +106,4 @@ }

return Autocomplete;
}(_react2.default.Component);
}(React.Component);
module.exports = Autocomplete;

@@ -120,3 +120,3 @@ {

],
"version": "0.0.8"
"version": "0.0.9"
}

@@ -11,6 +11,4 @@ /*

import React from 'react';
var React = require('react');
class Autocomplete extends React.Component {

@@ -17,0 +15,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc