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.3 to 1.0.4

10

lib/DataListInput.js

@@ -115,4 +115,10 @@ import React from 'react';

onSelect = (selectedItem) => {
if (selectedItem.key === this.state.lastValidItem.key) {
// do nothing onClick if key has not change since the last selection
if (this.state.lastValidItem !== undefined && selectedItem.key === this.state.lastValidItem.key){
// do not trigger the callback function
// but still change state to fit new selection
this.setState({
currentInput: selectedItem.label,
visible: false,
focusIndex: -1,
});
return;

@@ -119,0 +125,0 @@ }

2

package.json
{
"name": "react-datalist-input",
"version": "1.0.3",
"version": "1.0.4",
"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",

@@ -122,4 +122,10 @@ import React from 'react';

onSelect(selectedItem) {
if (selectedItem.key === this.state.lastValidItem.key) {
// do nothing onClick if key has not change since the last selection
if (this.state.lastValidItem !== undefined && selectedItem.key === this.state.lastValidItem.key){
// do not trigger the callback function
// but still change state to fit new selection
this.setState({
currentInput: selectedItem.label,
visible: false,
focusIndex: -1,
});
return;

@@ -126,0 +132,0 @@ }

Sorry, the diff of this file is too big to display

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