From 7a246d7d9c32275b0ee7cf478e630876e90381eb Mon Sep 17 00:00:00 2001 From: Just Jam Date: Sun, 8 Dec 2024 12:43:36 +0000 Subject: [PATCH] Removed conditional for displaying search exit component (#2269) --- ui/src/app/modules/plugins/plugins.component.html | 4 ++-- ui/src/app/modules/plugins/plugins.component.ts | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ui/src/app/modules/plugins/plugins.component.html b/ui/src/app/modules/plugins/plugins.component.html index 99cdf5b99..bef42d35e 100644 --- a/ui/src/app/modules/plugins/plugins.component.html +++ b/ui/src/app/modules/plugins/plugins.component.html @@ -15,8 +15,8 @@

{{ 'menu.label_plugins' | translate }}

[placeholder]="'plugins.placeholder_search_plugin' | translate" formControlName="query" /> - - + + diff --git a/ui/src/app/modules/plugins/plugins.component.ts b/ui/src/app/modules/plugins/plugins.component.ts index ade53a952..fcf50c43a 100644 --- a/ui/src/app/modules/plugins/plugins.component.ts +++ b/ui/src/app/modules/plugins/plugins.component.ts @@ -17,6 +17,7 @@ export class PluginsComponent implements OnInit, OnDestroy { public loading = true public installedPlugins: any = [] public childBridges = [] + public showExitButton = false public form = new FormGroup({ query: new FormControl('', [Validators.required]), }) @@ -73,7 +74,7 @@ export class PluginsComponent implements OnInit, OnDestroy { async loadInstalledPlugins() { this.form.setValue({ query: '' }) - + this.showExitButton = false this.installedPlugins = [] this.loading = true @@ -155,6 +156,7 @@ export class PluginsComponent implements OnInit, OnDestroy { search() { this.installedPlugins = [] this.loading = true + this.showExitButton = true this.$api.get(`/plugins/search/${encodeURIComponent(this.form.value.query)}`).subscribe({ next: (data) => { @@ -172,7 +174,6 @@ export class PluginsComponent implements OnInit, OnDestroy { } onClearSearch() { - this.form.setValue({ query: '' }) this.loadInstalledPlugins() }