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

react-autowhatever

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-autowhatever - npm Package Compare versions

Comparing version 1.1.2 to 1.2.1

11

dist/Autowhatever.js

@@ -130,2 +130,3 @@ 'use strict';

var onMouseDown = _props$itemProps.onMouseDown;
var onClick = _props$itemProps.onClick;

@@ -142,10 +143,14 @@ return items.map(function (item, itemIndex) {

} : function () {};
var onClickFn = onClick ? function (event) {
return onClick(event, { sectionIndex: sectionIndex, itemIndex: itemIndex });
} : function () {};
var itemProps = _extends({
id: _this.getItemId(sectionIndex, itemIndex),
role: 'option'
}, _this.props.itemProps, {
}, theme(itemIndex, 'item', sectionIndex === focusedSectionIndex && itemIndex === focusedItemIndex && 'item--focused'), _this.props.itemProps, {
onMouseEnter: onMouseEnterFn,
onMouseLeave: onMouseLeaveFn,
onMouseDown: onMouseDownFn
}, theme(itemIndex, 'item', sectionIndex === focusedSectionIndex && itemIndex === focusedItemIndex && 'item--focused'));
onMouseDown: onMouseDownFn,
onClick: onClickFn
});

@@ -152,0 +157,0 @@ return _react2['default'].createElement(

{
"name": "react-autowhatever",
"version": "1.1.2",
"version": "1.2.1",
"description": "Accessible rendering layer for Autosuggest and Autocomplete components",

@@ -5,0 +5,0 @@ "main": "dist/Autowhatever.js",

@@ -76,3 +76,3 @@ import React, { Component, PropTypes } from 'react';

const { renderItem, focusedSectionIndex, focusedItemIndex } = this.props;
const { onMouseEnter, onMouseLeave, onMouseDown } = this.props.itemProps;
const { onMouseEnter, onMouseLeave, onMouseDown, onClick } = this.props.itemProps;

@@ -89,5 +89,11 @@ return items.map((item, itemIndex) => {

() => {};
const onClickFn = onClick ?
event => onClick(event, { sectionIndex, itemIndex }) :
() => {};
const itemProps = {
id: this.getItemId(sectionIndex, itemIndex),
role: 'option',
...theme(itemIndex, 'item', sectionIndex === focusedSectionIndex &&
itemIndex === focusedItemIndex &&
'item--focused'),
...this.props.itemProps,

@@ -97,5 +103,3 @@ onMouseEnter: onMouseEnterFn,

onMouseDown: onMouseDownFn,
...theme(itemIndex, 'item', sectionIndex === focusedSectionIndex &&
itemIndex === focusedItemIndex &&
'item--focused')
onClick: onClickFn
};

@@ -102,0 +106,0 @@

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