Skip to content

Commit 8b74e65

Browse files
committed
memoize IdResolutionFeedbackComponent
1 parent 54bb4ea commit 8b74e65

5 files changed

Lines changed: 14 additions & 10 deletions

File tree

ehr/package-lock.json

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

ehr/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"dependencies": {
1818
"@labkey/api": "1.45.0",
1919
"@labkey/components": "7.13.1",
20-
"@labkey/ehr": "0.0.4-fb-ehr-hist-id-search.13"
20+
"@labkey/ehr": "0.0.4-fb-ehr-hist-id-search.14"
2121
},
2222
"devDependencies": {
2323
"@labkey/build": "8.7.0",

labkey-ui-ehr/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.

labkey-ui-ehr/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@labkey/ehr",
3-
"version": "0.0.4-fb-ehr-hist-id-search.13",
3+
"version": "0.0.4-fb-ehr-hist-id-search.14",
44
"description": "Components, models, actions, and utility functions for LabKey EHR applications and pages",
55
"sideEffects": false,
66
"files": [

labkey-ui-ehr/src/ParticipantHistory/SearchByIdPanel/IdResolutionFeedback.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { FC } from 'react';
1+
import React, { FC, memo } from 'react';
22

33
import { IdResolutionResult } from '../models';
44

@@ -18,7 +18,7 @@ interface IdResolutionFeedbackProps {
1818
resolutionResult: IdResolutionResult;
1919
}
2020

21-
export const IdResolutionFeedback: FC<IdResolutionFeedbackProps> = ({ resolutionResult }) => {
21+
const IdResolutionFeedbackComponent: FC<IdResolutionFeedbackProps> = ({ resolutionResult }) => {
2222
const { resolved, notFound } = resolutionResult;
2323

2424
// Separate direct matches from alias matches
@@ -80,3 +80,7 @@ export const IdResolutionFeedback: FC<IdResolutionFeedbackProps> = ({ resolution
8080
</div>
8181
);
8282
};
83+
84+
IdResolutionFeedbackComponent.displayName = 'IdResolutionFeedback';
85+
86+
export const IdResolutionFeedback = memo(IdResolutionFeedbackComponent);

0 commit comments

Comments
 (0)