Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

Commit

Permalink
prevent snippet item from clicking
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroX-DG committed Jul 10, 2018
1 parent 101a801 commit e9c179d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 4 additions & 2 deletions browser/render/components/tag-item/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import './tag-item'

export default class TagItem extends React.Component {
handleTagClick () {
const { tag } = this.props
eventEmitter.emit('tag:click', tag)
const { tag, notClickAble } = this.props
if (!notClickAble) {
eventEmitter.emit('tag:click', tag)
}
}

render () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ export default class SnippetItem extends React.Component {
<p className="m-t-10">
{tags.length > 0 ? (
tags.map((tag, index) => (
<TagItem config={config} tag={tag} key={index} />
<TagItem
config={config}
notClickAble={true}
tag={tag}
key={index}
/>
))
) : (
<span className="no-tag">No tag</span>
Expand Down

0 comments on commit e9c179d

Please sign in to comment.