Skip to content

Commit d4b4916

Browse files
committed
Clear activeResult when there are no results
1 parent 52fd6e7 commit d4b4916

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/webapp/ui/src/Inventory/Sample/Content/SubsampleDetails.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ function SubsampleDetails({ search }: SubsampleDetailsArgs) {
102102
* they would end up viewing the first result of the previous page and
103103
* not the last result of that previous page which is what they intend.
104104
*/
105-
if (search.filteredResults.length > 0 && !processingCardNav)
106-
void search.setActiveResult(search.filteredResults[0]);
105+
if (!processingCardNav) void search.setActiveResult();
107106
}, [search.filteredResults]);
108107

109108
const subsample = search.activeResult;

0 commit comments

Comments
 (0)