FIX: ensures group-navigation states changes when route changes (#8724)

This commit is contained in:
Joffrey JAFFEUX 2020-01-15 10:13:07 +01:00 committed by GitHub
parent f4744193bd
commit ac865112a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -2,6 +2,8 @@ import EmberObject from "@ember/object";
import { inject } from "@ember/controller"; import { inject } from "@ember/controller";
import Controller from "@ember/controller"; import Controller from "@ember/controller";
import { default as discourseComputed } from "discourse-common/utils/decorators"; import { default as discourseComputed } from "discourse-common/utils/decorators";
import { inject as service } from "@ember/service";
import { readOnly } from "@ember/object/computed";
const Tab = EmberObject.extend({ const Tab = EmberObject.extend({
init() { init() {
@ -17,6 +19,8 @@ export default Controller.extend({
counts: null, counts: null,
showing: "members", showing: "members",
destroying: null, destroying: null,
router: service(),
currentPath: readOnly("router._router.currentPath"),
@discourseComputed( @discourseComputed(
"showMessages", "showMessages",

View File

@ -56,7 +56,7 @@
<div class="user-content-wrapper"> <div class="user-content-wrapper">
<section class="user-primary-navigation"> <section class="user-primary-navigation">
<div class="container"> <div class="container">
{{group-navigation group=model currentPath=router._router.currentPath tabs=tabs}} {{group-navigation group=model currentPath=currentPath tabs=tabs}}
</div> </div>
</section> </section>