From 5b55cfbc4679d627746444586b409335c47ca5c7 Mon Sep 17 00:00:00 2001 From: megli2 Date: Wed, 19 Jul 2023 15:01:09 +0200 Subject: [PATCH] fix popping-up search-component --- frontend/app/components/team/index.js | 2 -- frontend/app/routes/teams/show.js | 4 ++++ frontend/app/templates/teams/index.hbs | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/app/components/team/index.js b/frontend/app/components/team/index.js index 8ab570625..13592baf0 100644 --- a/frontend/app/components/team/index.js +++ b/frontend/app/components/team/index.js @@ -7,8 +7,6 @@ export default class Index extends Component { @service loading; @tracked model = this.args.model; - @tracked q = this.args.q; - constructor() { super(...arguments); } diff --git a/frontend/app/routes/teams/show.js b/frontend/app/routes/teams/show.js index fe150094a..a02f44943 100644 --- a/frontend/app/routes/teams/show.js +++ b/frontend/app/routes/teams/show.js @@ -10,6 +10,10 @@ export default class TeamsShowRoute extends BaseRoute { templateName = "teams/index"; controllerName = "teams/index"; + beforeModel() { + this.navService.clearSearch(); + } + afterModel(_resolvedModel, transition) { this.navService.setSelectedTeamById(transition.to.params.team_id); this.navService.selectedFolder = null; diff --git a/frontend/app/templates/teams/index.hbs b/frontend/app/templates/teams/index.hbs index ca2d8e893..1fa2f5b73 100644 --- a/frontend/app/templates/teams/index.hbs +++ b/frontend/app/templates/teams/index.hbs @@ -7,8 +7,8 @@ {{else}} - {{#if this.q}} - + {{#if this.navService.searchQuery}} + {{/if}} {{#if @model}} {{#each this.model as |team|}}