mirror of
https://github.com/flarum/core.git
synced 2025-07-23 17:51:24 +02:00
Clicking on an index nav item should always refresh the discussion list
This commit is contained in:
@@ -32,7 +32,7 @@ export default class Component {
|
||||
static component(props) {
|
||||
props = props || {};
|
||||
if (this.props) {
|
||||
props = this.props(props);
|
||||
this.props(props);
|
||||
}
|
||||
var view = function(component) {
|
||||
component.props = props;
|
||||
|
@@ -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) : ''
|
||||
|
Reference in New Issue
Block a user