From e9977287deebf9adea3385c36c61ebcaf1be66c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Chalifour?= Date: Wed, 14 Aug 2019 10:43:24 +0200 Subject: [PATCH] feat(currentRefinements): support multiple indices (#4012) --- .../CurrentRefinements/CurrentRefinements.tsx | 5 +- .../__tests__/CurrentRefinements-test.tsx | 15 ++ .../CurrentRefinements-test.tsx.snap | 30 +-- .../__tests__/connectAutocomplete-test.ts | 4 + .../connectCurrentRefinements-test.ts | 139 ++++++++++- .../connectCurrentRefinements.ts | 30 +-- src/types/widget.ts | 1 + .../current-refinements-test.ts.snap | 9 + .../__tests__/current-refinements-test.ts | 223 ++++++++++-------- src/widgets/index/__tests__/index-test.ts | 17 ++ src/widgets/index/index.ts | 1 + stories/current-refinements.stories.js | 50 ++++ test/mock/createWidget.ts | 1 + 13 files changed, 392 insertions(+), 133 deletions(-) diff --git a/src/components/CurrentRefinements/CurrentRefinements.tsx b/src/components/CurrentRefinements/CurrentRefinements.tsx index 7e132a2bf5..9e56527bdd 100644 --- a/src/components/CurrentRefinements/CurrentRefinements.tsx +++ b/src/components/CurrentRefinements/CurrentRefinements.tsx @@ -37,7 +37,10 @@ const CurrentRefinements = ({ items, cssClasses }: CurrentRefinementsProps) => (