react-infinity-menu
Advanced tools
Comparing version 2.1.2 to 2.1.3
@@ -403,3 +403,3 @@ "use strict"; | ||
filter: function filter(node, searchInput) { | ||
node.name.toLowerCase().includes(searchInput.toLowerCase()); | ||
return node.name.toLowerCase().includes(searchInput.toLowerCase()); | ||
}, | ||
@@ -406,0 +406,0 @@ onNodeMouseClick: function onNodeMouseClick() {}, |
{ | ||
"name": "react-infinity-menu", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "[![Circle CI](https://circleci.com/gh/socialtables/react-infinity-menu.svg?style=svg&circle-token=230aaa396d006f1dc8d875b340834234c4937bbc)](https://circleci.com/gh/socialtables/react-infinity-menu)", | ||
@@ -5,0 +5,0 @@ "main": "./dist/infinity-menu.js", |
@@ -22,3 +22,3 @@ # react-infinity-menu | ||
class Example extends React.Component { | ||
onNodeMouseClick(event, tree, node, level) { | ||
onNodeMouseClick(event, tree, node, level, keyPath) { | ||
this.setState({ | ||
@@ -168,3 +168,3 @@ tree: tree | ||
#### onNodeMouseClick(function)[event, tree, node, level] | ||
#### onNodeMouseClick(function)[event, tree, node, level, keyPath] | ||
This function will get call when user click on the folder(node). | ||
@@ -176,2 +176,3 @@ The function arguments include ```event```, ```tree```, ```node``` and ```level```. | ||
* ```level``` is the distance from the root. | ||
* ```keyPath``` is the path from root to current node | ||
@@ -184,3 +185,3 @@ | ||
* ```event``` is the click event. | ||
* ```leaf``` is the item user clicked on. Includes name, id and all data the user inputs when they pass in the tree. | ||
* ```leaf``` is the item user clicked on. Includes name, id, keyPath and all data the user inputs when they pass in the tree. | ||
@@ -193,3 +194,3 @@ | ||
* ```event``` is the click event. | ||
* ```leaf``` is the item user clicked on. Includes name, id and all data the user inputs when they pass in the tree. | ||
* ```leaf``` is the item user clicked on. Includes name, id, keyPath and all data the user inputs when they pass in the tree. | ||
@@ -202,3 +203,3 @@ | ||
* ```event``` is the click event. | ||
* ```leaf``` is the item user clicked on. Includes name, id and all data the user inputs when they pass in the tree. | ||
* ```leaf``` is the item user clicked on. Includes name, id, keyPath and all data the user inputs when they pass in the tree. | ||
@@ -205,0 +206,0 @@ |
@@ -328,3 +328,3 @@ import React from "react"; | ||
emptyTreeComponentProps: {}, | ||
filter: (node, searchInput) => { node.name.toLowerCase().includes(searchInput.toLowerCase()) }, | ||
filter: (node, searchInput) => node.name.toLowerCase().includes(searchInput.toLowerCase()), | ||
onNodeMouseClick: ()=>{}, | ||
@@ -331,0 +331,0 @@ onLeafMouseClick: ()=>{}, |
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
375101
215