close permission selector when you click outside
This commit is contained in:
parent
73d88771af
commit
9d0924f722
2 changed files with 8 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
import React, { PropTypes, Component } from 'react'
|
||||
|
||||
// TODO how do we make it so that clicking elsewhere on the topic
|
||||
// card cancels this
|
||||
import onClickOutsideAddon from 'react-onclickoutside'
|
||||
|
||||
class Permission extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
@ -22,6 +22,10 @@ class Permission extends Component {
|
|||
this.setState({selectingPermission: false})
|
||||
}
|
||||
|
||||
handleClickOutside = instance => {
|
||||
this.closePermissionSelect()
|
||||
}
|
||||
|
||||
liClick = value => event => {
|
||||
this.closePermissionSelect()
|
||||
this.props.updateTopic({
|
||||
|
@ -62,4 +66,4 @@ Permission.propTypes = {
|
|||
updateTopic: PropTypes.func
|
||||
}
|
||||
|
||||
export default Permission
|
||||
export default onClickOutsideAddon(Permission)
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
"react": "15.4.2",
|
||||
"react-dom": "15.4.2",
|
||||
"react-dropzone": "3.9.1",
|
||||
"react-onclickoutside": "^5.9.0",
|
||||
"redux": "3.6.0",
|
||||
"riek": "^1.0.7",
|
||||
"simplewebrtc": "2.2.2",
|
||||
|
|
Loading…
Add table
Reference in a new issue