From 790b29eb724411a63d258871bb71ee0b98a752b1 Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Wed, 16 Aug 2023 13:53:13 -0400 Subject: [PATCH 1/2] Hide empty properties better --- .../addon/components/search-page/filter-facet/template.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/osf-components/addon/components/search-page/filter-facet/template.hbs b/lib/osf-components/addon/components/search-page/filter-facet/template.hbs index d7e05aabd0..3cc0fecd4e 100644 --- a/lib/osf-components/addon/components/search-page/filter-facet/template.hbs +++ b/lib/osf-components/addon/components/search-page/filter-facet/template.hbs @@ -1,4 +1,4 @@ -{{#if @property.cardSearchResultCount}} +{{#if (gt @property.cardSearchResultCount 0)}}
Date: Wed, 16 Aug 2023 14:18:44 -0400 Subject: [PATCH 2/2] Better fix for empty property values --- app/models/related-property-path.ts | 2 +- .../addon/components/search-page/filter-facet/template.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/related-property-path.ts b/app/models/related-property-path.ts index e66b38c9b4..604c8e15e4 100644 --- a/app/models/related-property-path.ts +++ b/app/models/related-property-path.ts @@ -15,7 +15,7 @@ interface PropertyPath { export default class RelatedPropertyPathModel extends OsfModel { @attr('string') propertyPathKey!: string; - @attr('string') cardSearchResultCount!: string; + @attr('number') cardSearchResultCount!: number; @attr('array') osfmapPropertyPath!: string[]; @attr('array') propertyPath!: PropertyPath[]; diff --git a/lib/osf-components/addon/components/search-page/filter-facet/template.hbs b/lib/osf-components/addon/components/search-page/filter-facet/template.hbs index 3cc0fecd4e..d7e05aabd0 100644 --- a/lib/osf-components/addon/components/search-page/filter-facet/template.hbs +++ b/lib/osf-components/addon/components/search-page/filter-facet/template.hbs @@ -1,4 +1,4 @@ -{{#if (gt @property.cardSearchResultCount 0)}} +{{#if @property.cardSearchResultCount}}