react-infinity-menu
Advanced tools
Comparing version 3.0.2 to 3.1.0
@@ -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, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
376725
1472