Socket
Socket
Sign inDemoInstall

react-infinity-menu

Package Overview
Dependencies
Maintainers
31
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-infinity-menu - npm Package Compare versions

Comparing version 3.0.2 to 3.1.0

18

dist/infinity-menu.js

@@ -215,4 +215,5 @@ "use strict";

var shouldDisplay = isSearching && curr.isSearchDisplay || !isSearching;
curr.keyPath = keyPath;
/*the leaves*/
if (!curr.children) {

@@ -223,9 +224,6 @@ var keyPathArray = keyPath.split('.');

var filteredChildren = _lodash2["default"].some(parentNode.children, { isSearchDisplay: true }) ? _lodash2["default"].filter(parentNode.children, { isSearchDisplay: true }) : parentNode.children;
var itemKey = "infinity-menu-leaf-" + curr.id;
var visIds = filteredChildren.map(function (e) {
return e.id;
});
curr.keyPath = keyPath;

@@ -240,5 +238,11 @@ var relativeIndex = visIds.indexOf(curr.id);

key: itemKey,
onMouseDown: this.props.onLeafMouseDown,
onMouseUp: this.props.onLeafMouseUp,
onClick: this.props.onLeafMouseClick,
onMouseDown: function onMouseDown(e) {
_this2.props.onLeafMouseDown ? _this2.props.onLeafMouseDown(e, curr) : null;
},
onMouseUp: function onMouseUp(e) {
_this2.props.onLeafMouseUp ? _this2.props.onLeafMouseUp(e, curr) : null;
},
onClick: function onClick(e) {
_this2.props.onLeafMouseClick ? _this2.props.onLeafMouseClick(e, curr) : null;
},
name: curr.name,

@@ -245,0 +249,0 @@ icon: curr.icon,

{
"name": "react-infinity-menu",
"version": "3.0.2",
"version": "3.1.0",
"description": "An unlimited deep side menu",

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

@@ -158,4 +158,5 @@ import React from "react";

const shouldDisplay = (isSearching && curr.isSearchDisplay) || !isSearching;
curr.keyPath = keyPath;
/*the leaves*/
if (!curr.children) {

@@ -166,8 +167,6 @@ const keyPathArray = keyPath.split('.')

const filteredChildren = (_.some(parentNode.children,{isSearchDisplay: true})) ? _.filter(parentNode.children,{isSearchDisplay: true}) : parentNode.children
const itemKey = "infinity-menu-leaf-" + curr.id;
const visIds = filteredChildren.map((e) => e.id)
curr.keyPath = keyPath;
let relativeIndex = visIds.indexOf(curr.id)

@@ -181,5 +180,5 @@ relativeIndex = (relativeIndex === -1) ? Infinity : relativeIndex

key: itemKey,
onMouseDown: this.props.onLeafMouseDown,
onMouseUp: this.props.onLeafMouseUp,
onClick: this.props.onLeafMouseClick,
onMouseDown: (e) => {this.props.onLeafMouseDown ? this.props.onLeafMouseDown(e, curr) : null},
onMouseUp: (e) => {this.props.onLeafMouseUp ? this.props.onLeafMouseUp(e, curr) : null},
onClick: (e) => {this.props.onLeafMouseClick ? this.props.onLeafMouseClick(e, curr) : null},
name: curr.name,

@@ -186,0 +185,0 @@ icon: curr.icon,

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