Clicking on an index nav item should always refresh the discussion list

This commit is contained in:
Toby Zerner
2015-05-18 15:27:39 +09:30
parent 10acb839cf
commit 8cba7ad3f2
4 changed files with 18 additions and 4 deletions

View File

@ -4,7 +4,11 @@ import icon from 'flarum/helpers/icon'
export default class NavItem extends Component {
view() {
var active = this.constructor.active(this.props);
return m('li'+(active ? '.active' : ''), m('a', {href: this.props.href, config: m.route}, [
return m('li'+(active ? '.active' : ''), m('a', {
href: this.props.href,
onclick: this.props.onclick,
config: m.route
}, [
icon(this.props.icon+' icon'),
this.props.label, ' ',
this.props.badge ? m('span.count', this.props.badge) : ''