From f5f6b92d1b49a879b64382b6c53ccad513b5ae2c Mon Sep 17 00:00:00 2001 From: Drew Ansbacher Date: Thu, 30 Sep 2021 12:29:12 -0600 Subject: [PATCH] mk list search fix --- .../marketplace-list/marketplace-list.page.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/src/app/pages/marketplace-routes/marketplace-list/marketplace-list.page.ts b/ui/src/app/pages/marketplace-routes/marketplace-list/marketplace-list.page.ts index ec17e10a1..67686dfb6 100644 --- a/ui/src/app/pages/marketplace-routes/marketplace-list/marketplace-list.page.ts +++ b/ui/src/app/pages/marketplace-routes/marketplace-list/marketplace-list.page.ts @@ -96,7 +96,9 @@ export class MarketplaceListPage { } async search (): Promise { - this.category = undefined + if (this.query) { + this.category = undefined + } await this.filterPkgs() } @@ -140,7 +142,7 @@ export class MarketplaceListPage { } const fuse = new Fuse(pkgsToSort, { ...defaultOps, threshold: 1 }) - this.pkgs = fuse.search(this.category !== 'all' ? this.category : 'bit').map(p => p.item) + this.pkgs = fuse.search(this.category !== 'all' ? this.category || '' : 'bit').map(p => p.item) } } }