Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-datalist-input

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-datalist-input - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

11

lib/DataListInput.js

@@ -27,6 +27,5 @@ import React from 'react';

* gets called when someone starts to write in the input field
* @param event
* @param value
*/
onHandleInput = (event) => {
const currentInput = event.target.value;
onHandleInput = (currentInput) => {
const matchingItems = this.props.items.filter((item) => {

@@ -38,4 +37,4 @@ if (typeof(this.props.match) === typeof(Function))

this.setState({
currentInput: currentInput,
matchingItems: matchingItems,
currentInput,
matchingItems,
focusIndex: 0,

@@ -159,3 +158,3 @@ visible: true,

renderInputField = ( placeholder, currentInput, inputClassName ) => (
<input onKeyDown={this.onHandleKeydown} onInput={this.onHandleInput} type="text"
<input onKeyDown={this.onHandleKeydown} onChange={this.onHandleInput} type="text"
className={ `autocomplete-input ${inputClassName}` }

@@ -162,0 +161,0 @@ placeholder={placeholder} value={currentInput}/>

{
"name": "react-datalist-input",
"version": "1.0.8",
"version": "1.0.9",
"description": "This package provides a react component as follows: an input field with a drop down menu to pick a possible option based on the current input.",

@@ -5,0 +5,0 @@ "main": "build/index.js",

@@ -38,4 +38,3 @@ import React from 'react';

*/
onHandleInput(event) {
const currentInput = event.target.value;
onHandleInput(currentInput) {
const matchingItems = this.props.items.filter((item) => {

@@ -47,4 +46,4 @@ if (typeof(this.props.match) === typeof(Function))

this.setState({
currentInput: currentInput,
matchingItems: matchingItems,
currentInput,
matchingItems,
focusIndex: 0,

@@ -51,0 +50,0 @@ visible: true,

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc