Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions datahub-web-react/src/app/searchV2/SearchResultList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ export const SearchResultList = ({
id="search-result-list"
$isShowNavBarRedesign={isShowNavBarRedesign}
dataSource={searchResults}
rowKey={(item) => item.entity.urn}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Custom agent: Enforce Pragmatic Test Coverage

This fixes a user-visible crash during re-sorting, but no test exercises changing result order and verifies cards remount without a hook-count error. Add a regression test for that transition.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At datahub-web-react/src/app/searchV2/SearchResultList.tsx, line 250:

<comment>This fixes a user-visible crash during re-sorting, but no test exercises changing result order and verifies cards remount without a hook-count error. Add a regression test for that transition.</comment>

<file context>
@@ -247,6 +247,7 @@ export const SearchResultList = ({
             id="search-result-list"
             $isShowNavBarRedesign={isShowNavBarRedesign}
             dataSource={searchResults}
+            rowKey={(item) => item.entity.urn}
             split={false}
             locale={{ emptyText: (!loading && <EmptySearchResults suggestions={suggestions} />) || <></> }}
</file context>

split={false}
locale={{ emptyText: (!loading && <EmptySearchResults suggestions={suggestions} />) || <></> }}
renderItem={(item, index) => {
Expand Down
Loading