Skip to content

Commit ae60515

Browse files
authored
Merge pull request #457 from yext/hotfix/v1.6.2
Version 1.6.2 **Fixes** - Enables Document Verticals to use VerticalResult by adjusting VerticalResult map key to combine the result id and index avoiding conflicts #456
2 parents 9b282d9 + 01ecfa9 commit ae60515

6 files changed

Lines changed: 5 additions & 4 deletions

File tree

2.78 KB
Loading
2.78 KB
Loading
2.65 KB
Loading

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@yext/search-ui-react",
3-
"version": "1.6.1",
3+
"version": "1.6.2",
44
"description": "A library of React Components for powering Yext Search integrations",
55
"author": "slapshot@yext.com",
66
"license": "BSD-3-Clause",

src/components/VerticalResultsDisplay.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,6 @@ function renderResult<T>(
5656
CardComponent: CardComponent<T>,
5757
result: Result<T>
5858
): JSX.Element {
59-
return <CardComponent result={result} key={result.id || result.index}/>;
59+
const key = result.id && result.index ? `${result.id}-${result.index}` : result.id || result.index;
60+
return <CardComponent result={result} key={key}/>;
6061
}

0 commit comments

Comments
 (0)