Skip to content

Commit

Permalink
fix logic for memo custom comparator
Browse files Browse the repository at this point in the history
  • Loading branch information
dukenv0307 committed Aug 11, 2023
1 parent ad6cbd0 commit 4ac83ed
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/LHNOptionsList/OptionRowLHNData.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,9 @@ export default compose(
},
}),
)(
memo(
OptionRowLHNData,
(prevProps, nextProps) => prevProps.parentReportActions[prevProps.fullReport.parentReportActionID] === nextProps.parentReportActions[nextProps.fullReport.parentReportActionID],
),
memo(OptionRowLHNData, (prevProps, nextProps) => {
const prevParentReportActions = prevProps.parentReportActions[prevProps.fullReport.parentReportActionID];
const nextParentReportActions = nextProps.parentReportActions[nextProps.fullReport.parentReportActionID];
return prevParentReportActions === nextParentReportActions && _.isEqual(_.omit(prevProps, 'parentReportActions'), _.omit(nextProps, 'parentReportActions'));
}),
);

0 comments on commit 4ac83ed

Please sign in to comment.