diff --git a/src/app/context-menu.js b/src/app/context-menu.js index 2d6a626..7599c16 100644 --- a/src/app/context-menu.js +++ b/src/app/context-menu.js @@ -40,7 +40,7 @@ export default class ContextMenu extends Component { zIndex: 3 }, !this.props.rightAlign ? { left: -30 } : { right: -30 })}> { - this.props.menu && this.props.menu.map(menu => { + this.props.menu && this.props.menu.map((menu, index) => { menu.click() this.setState({toggle: !this.state.toggle}) e.preventDefault() diff --git a/src/app/torrent-page.js b/src/app/torrent-page.js index 240fd28..317a4ec 100644 --- a/src/app/torrent-page.js +++ b/src/app/torrent-page.js @@ -104,7 +104,7 @@ const treeToTorrentFiles = (tree, torrent, toggles) => { leftIcon={!tree[file].__fileBT ? : contentIcon(fileTypeDetect({path: file}))} rightToggle={ newToggles.length > 0 - && + ? selected )} onToggle={(e, checked) => { @@ -114,7 +114,10 @@ const treeToTorrentFiles = (tree, torrent, toggles) => { newToggles.forEach(({downloadIndex}) => toggleValues[downloadIndex] = checked) window.torrentSocket.emit('downloadSelectFiles', torrent, toggleValues) }} - />} + /> + : + null + } />); if(toggles)