From a1405a790032b5a58fdf00308dce433207727265 Mon Sep 17 00:00:00 2001 From: futa-ikeda <51409893+futa-ikeda@users.noreply.github.com> Date: Mon, 21 Aug 2023 01:52:24 -0400 Subject: [PATCH] Allow multiple values for a filterable property (#1947) --- lib/osf-components/addon/components/search-page/component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/osf-components/addon/components/search-page/component.ts b/lib/osf-components/addon/components/search-page/component.ts index 31cf394591..0268ed207a 100644 --- a/lib/osf-components/addon/components/search-page/component.ts +++ b/lib/osf-components/addon/components/search-page/component.ts @@ -199,7 +199,8 @@ export default class SearchPage extends Component { return acc; } // other filters should look like cardSearchFilter[propertyName]=IRI - acc[filter.propertyShortFormLabel] = filter.value; + const currentValue = acc[filter.propertyShortFormLabel]; + acc[filter.propertyShortFormLabel] = currentValue ? currentValue.concat(filter.value) : [filter.value]; return acc; }, {} as { [key: string]: any }); let resourceTypeFilter = this.resourceType as string;