From 6120d082810ec819c7d29912d9cc1a3de5d734b3 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sat, 25 Feb 2017 15:27:19 -0800 Subject: [PATCH] fix overeager metacode selector --- frontend/src/components/TopicCard/Links.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/TopicCard/Links.js b/frontend/src/components/TopicCard/Links.js index 23e6cfe1..7683bae2 100644 --- a/frontend/src/components/TopicCard/Links.js +++ b/frontend/src/components/TopicCard/Links.js @@ -70,6 +70,12 @@ class Links extends Component { return output } + handleMetacodeBarClick = () => { + if (this.state.showMetacodeTitle) { + this.setState({ showMetacodeSelect: !this.state.showMetacodeSelect }) + } + } + render = () => { const { topic, ActiveMapper } = this.props const authorizedToEdit = topic.authorizeToEdit(ActiveMapper) @@ -80,7 +86,7 @@ class Links extends Component {
this.setState({ showMetacodeTitle: false, showMetacodeSelect: false })} - onClick={() => this.setState({ showMetacodeSelect: !this.state.showMetacodeSelect })} + onClick={this.handleMetacodeBarClick} >