reactjs-dropdown-component
Advanced tools
Comparing version 1.1.4 to 1.1.5
{ | ||
"name": "reactjs-dropdown-component", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "Single and multi select dropwdown menu components", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -90,4 +90,6 @@ This package features two custom dropdown menu components for ReactJS. | ||
```javascript | ||
toggleItem = (id, key) => { | ||
let temp = JSON.parse(JSON.stringify(this.state[key])); | ||
toggleItem = (item) => { | ||
const { id, key } = item; | ||
const temp = JSON.parse(JSON.stringify(this.state[key])); | ||
temp[id].selected = !temp[id].selected; | ||
@@ -94,0 +96,0 @@ this.setState({ |
123914
148