1- import lodashIsEqual from 'lodash/isEqual ' ;
1+ import { deepEqual } from 'fast-equals ' ;
22import React , { useEffect , useRef , useState } from 'react' ;
33import type { StyleProp , TextStyle , ViewStyle } from 'react-native' ;
44import { InteractionManager , StyleSheet , View } from 'react-native' ;
55import useLocalize from '@hooks/useLocalize' ;
66import useStyleUtils from '@hooks/useStyleUtils' ;
77import useTheme from '@hooks/useTheme' ;
88import useThemeStyles from '@hooks/useThemeStyles' ;
9- import * as OptionsListUtils from '@libs/OptionsListUtils' ;
10- import * as ReportUtils from '@libs/ReportUtils' ;
9+ import { shouldOptionShowTooltip } from '@libs/OptionsListUtils' ;
10+ import { getDisplayNamesWithTooltips } from '@libs/ReportUtils' ;
1111import type { OptionData } from '@libs/ReportUtils' ;
1212import CONST from '@src/CONST' ;
1313import Button from './Button' ;
@@ -149,7 +149,7 @@ function OptionRow({
149149 const firstIcon = option ?. icons ?. at ( 0 ) ;
150150
151151 // We only create tooltips for the first 10 users or so since some reports have hundreds of users, causing performance to degrade.
152- const displayNamesWithTooltips = ReportUtils . getDisplayNamesWithTooltips ( ( option . participantsList ?? ( option . accountID ? [ option ] : [ ] ) ) . slice ( 0 , 10 ) , shouldUseShortFormInTooltip ) ;
152+ const displayNamesWithTooltips = getDisplayNamesWithTooltips ( ( option . participantsList ?? ( option . accountID ? [ option ] : [ ] ) ) . slice ( 0 , 10 ) , shouldUseShortFormInTooltip ) ;
153153 let subscriptColor = theme . appBG ;
154154 if ( optionIsFocused ) {
155155 subscriptColor = focusedBackgroundColor ;
@@ -221,7 +221,7 @@ function OptionRow({
221221 icons = { option . icons }
222222 size = { CONST . AVATAR_SIZE . DEFAULT }
223223 secondAvatarStyle = { [ StyleUtils . getBackgroundAndBorderStyle ( hovered && ! optionIsFocused ? hoveredBackgroundColor : subscriptColor ) ] }
224- shouldShowTooltip = { showTitleTooltip && OptionsListUtils . shouldOptionShowTooltip ( option ) }
224+ shouldShowTooltip = { showTitleTooltip && shouldOptionShowTooltip ( option ) }
225225 />
226226 ) ) }
227227 < View style = { contentContainerStyles } >
@@ -358,7 +358,7 @@ export default React.memo(
358358 prevProps . showSelectedState === nextProps . showSelectedState &&
359359 prevProps . highlightSelected === nextProps . highlightSelected &&
360360 prevProps . showTitleTooltip === nextProps . showTitleTooltip &&
361- lodashIsEqual ( prevProps . option . icons , nextProps . option . icons ) &&
361+ deepEqual ( prevProps . option . icons , nextProps . option . icons ) &&
362362 prevProps . optionIsFocused === nextProps . optionIsFocused &&
363363 prevProps . option . text === nextProps . option . text &&
364364 prevProps . option . alternateText === nextProps . option . alternateText &&
@@ -370,7 +370,7 @@ export default React.memo(
370370 prevProps . option . pendingAction === nextProps . option . pendingAction &&
371371 prevProps . option . customIcon === nextProps . option . customIcon &&
372372 prevProps . option . tabIndex === nextProps . option . tabIndex &&
373- lodashIsEqual ( prevProps . option . amountInputProps , nextProps . option . amountInputProps ) ,
373+ deepEqual ( prevProps . option . amountInputProps , nextProps . option . amountInputProps ) ,
374374) ;
375375
376376export type { OptionRowProps } ;
0 commit comments