mirror of
https://github.com/BoostIo/Boostnote
synced 2026-06-24 23:34:03 +00:00
add Tag filter
This commit is contained in:
@@ -11,7 +11,8 @@ var PlanetArticleDetail = React.createClass({
|
||||
propTypes: {
|
||||
article: React.PropTypes.object,
|
||||
onOpenEditModal: React.PropTypes.func,
|
||||
onOpenDeleteModal: React.PropTypes.func
|
||||
onOpenDeleteModal: React.PropTypes.func,
|
||||
showOnlyWithTag: React.PropTypes.func
|
||||
},
|
||||
getInitialState: function () {
|
||||
return {
|
||||
@@ -29,9 +30,9 @@ var PlanetArticleDetail = React.createClass({
|
||||
}
|
||||
var tags = article.Tags.length > 0 ? article.Tags.map(function (tag) {
|
||||
return (
|
||||
<a key={tag.id} href>#{tag.name}</a>
|
||||
<a onClick={this.props.showOnlyWithTag(tag.name)} key={tag.id}>#{tag.name}</a>
|
||||
)
|
||||
}) : (
|
||||
}.bind(this)) : (
|
||||
<a className='noTag'>Not tagged yet</a>
|
||||
)
|
||||
if (article.type === 'snippet') {
|
||||
|
||||
Reference in New Issue
Block a user