Skip to content

Commit

Permalink
Fix #334
Browse files Browse the repository at this point in the history
  • Loading branch information
inukshuk committed Mar 5, 2019
1 parent 986045f commit 583244d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/components/tag/panel.js
Expand Up @@ -47,16 +47,14 @@ class TagPanel extends React.PureComponent {
}

handleTagRemove = (tag) => {
const id = this.getTaggedIds(tag)

let id = this.getTaggedIds(tag)
if (id.length > 0) {
this.props.onItemTagRemove({ id, tags: [tag.id] })
}
}

handleTagAdd = (tag) => {
const id = this.getTaggedIds(tag, true)

let id = this.getTaggedIds(tag, true)
if (id.length > 0) {
this.props.onItemTagAdd({ id, tags: [tag.id] })
}
Expand All @@ -82,8 +80,9 @@ class TagPanel extends React.PureComponent {
keymap={this.props.keymap}
tags={this.props.tags}
hasFocusIcon
onRemove={this.handleTagRemove}
onContextMenu={this.handleContextMenu}/>
onCommit={this.handleTagAdd}
onContextMenu={this.handleContextMenu}
onRemove={this.handleTagRemove}/>
<TagAdder
ref={this.setAdder}
isDisabled={this.props.isDisabled}
Expand Down

0 comments on commit 583244d

Please sign in to comment.