Fixed "Members activity" nav link losing active class when filtered

refs https://github.com/TryGhost/Team/issues/1290

- added an explicit `current-when="members-activity"` so the active class is not tied to the default behaviour of matching specific query params
This commit is contained in:
Kevin Ansfield 2022-01-24 17:44:09 +00:00
parent ae8cb00300
commit e45dd1c3a7

View File

@ -85,9 +85,9 @@
{{#if (feature "membersActivityFeed")}}
<li>
{{#if (eq this.router.currentRouteName "members-activity")}}
<LinkTo @route="members-activity" @query={{reset-query-params "members-activity"}} data-test-nav="members-activity">{{svg-jar "members"}} Members activity</LinkTo>
<LinkTo @route="members-activity" @current-when="members-activity" @query={{reset-query-params "members-activity"}} data-test-nav="members-activity">{{svg-jar "members"}} Members activity</LinkTo>
{{else}}
<LinkTo @route="members-activity" data-test-nav="members-activity">{{svg-jar "members"}} Members activity</LinkTo>
<LinkTo @route="members-activity" @current-when="members-activity" data-test-nav="members-activity">{{svg-jar "members"}} Members activity</LinkTo>
{{/if}}
</li>
{{/if}}