diff --git a/src/components/SelectionList/InviteMemberListItem.tsx b/src/components/SelectionList/InviteMemberListItem.tsx index aabde59ac374..881d313755e7 100644 --- a/src/components/SelectionList/InviteMemberListItem.tsx +++ b/src/components/SelectionList/InviteMemberListItem.tsx @@ -13,9 +13,9 @@ import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import CONST from '@src/CONST'; import BaseListItem from './BaseListItem'; -import type {InviteMemberListItemProps} from './types'; +import type {InviteMemberListItemProps, ListItem} from './types'; -function InviteMemberListItem({ +function InviteMemberListItem({ item, isFocused, showTooltip, @@ -26,7 +26,7 @@ function InviteMemberListItem({ onDismissError, shouldPreventDefaultFocusOnSelectRow, rightHandSideComponent, -}: InviteMemberListItemProps) { +}: InviteMemberListItemProps) { const styles = useThemeStyles(); const theme = useTheme(); const StyleUtils = useStyleUtils(); diff --git a/src/components/SelectionList/RadioListItem.tsx b/src/components/SelectionList/RadioListItem.tsx index b6b11c2f273c..b330efcd8a8f 100644 --- a/src/components/SelectionList/RadioListItem.tsx +++ b/src/components/SelectionList/RadioListItem.tsx @@ -4,9 +4,9 @@ import TextWithTooltip from '@components/TextWithTooltip'; import useThemeStyles from '@hooks/useThemeStyles'; import CONST from '@src/CONST'; import BaseListItem from './BaseListItem'; -import type {RadioListItemProps} from './types'; +import type {ListItem, RadioListItemProps} from './types'; -function RadioListItem({ +function RadioListItem({ item, isFocused, showTooltip, @@ -16,7 +16,7 @@ function RadioListItem({ shouldPreventDefaultFocusOnSelectRow, rightHandSideComponent, isMultilineSupported = false, -}: RadioListItemProps) { +}: RadioListItemProps) { const styles = useThemeStyles(); const fullTitle = isMultilineSupported ? item.text?.trimStart() : item.text; const indentsLength = (item.text?.length ?? 0) - (fullTitle?.length ?? 0); diff --git a/src/components/SelectionList/TableListItem.tsx b/src/components/SelectionList/TableListItem.tsx index a233f5dd83fd..b6ed4016f400 100644 --- a/src/components/SelectionList/TableListItem.tsx +++ b/src/components/SelectionList/TableListItem.tsx @@ -10,9 +10,9 @@ import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import CONST from '@src/CONST'; import BaseListItem from './BaseListItem'; -import type {TableListItemProps} from './types'; +import type {ListItem, TableListItemProps} from './types'; -function TableListItem({ +function TableListItem({ item, isFocused, showTooltip, @@ -23,7 +23,7 @@ function TableListItem({ onDismissError, shouldPreventDefaultFocusOnSelectRow, rightHandSideComponent, -}: TableListItemProps) { +}: TableListItemProps) { const styles = useThemeStyles(); const theme = useTheme(); const StyleUtils = useStyleUtils(); diff --git a/src/components/SelectionList/UserListItem.tsx b/src/components/SelectionList/UserListItem.tsx index 7ab777e7e0f1..940828ebcac3 100644 --- a/src/components/SelectionList/UserListItem.tsx +++ b/src/components/SelectionList/UserListItem.tsx @@ -14,9 +14,9 @@ import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import CONST from '@src/CONST'; import BaseListItem from './BaseListItem'; -import type {UserListItemProps} from './types'; +import type {ListItem, UserListItemProps} from './types'; -function UserListItem({ +function UserListItem({ item, isFocused, showTooltip, @@ -27,7 +27,7 @@ function UserListItem({ onDismissError, shouldPreventDefaultFocusOnSelectRow, rightHandSideComponent, -}: UserListItemProps) { +}: UserListItemProps) { const styles = useThemeStyles(); const theme = useTheme(); const StyleUtils = useStyleUtils(); diff --git a/src/components/SelectionList/types.ts b/src/components/SelectionList/types.ts index 8e0f53270bde..ad293335d6ef 100644 --- a/src/components/SelectionList/types.ts +++ b/src/components/SelectionList/types.ts @@ -12,7 +12,7 @@ import type RadioListItem from './RadioListItem'; import type TableListItem from './TableListItem'; import type UserListItem from './UserListItem'; -type CommonListItemProps = { +type CommonListItemProps = { /** Whether this item is focused (for arrow key controls) */ isFocused?: boolean; @@ -116,9 +116,9 @@ type ListItem = { brickRoadIndicator?: BrickRoad | '' | null; }; -type ListItemProps = CommonListItemProps & { +type ListItemProps = CommonListItemProps & { /** The section list item */ - item: ListItem; + item: TItem; /** Additional styles to apply to text */ style?: StyleProp; @@ -140,10 +140,10 @@ type BaseListItemProps = CommonListItemProps & { errors?: Errors | ReceiptErrors | null; pendingAction?: PendingAction | null; FooterComponent?: ReactElement; - children?: ReactElement | ((hovered: boolean) => ReactElement); + children?: ReactElement> | ((hovered: boolean) => ReactElement>); }; -type UserListItemProps = ListItemProps & { +type UserListItemProps = ListItemProps & { /** Errors that this user may contain */ errors?: Errors | ReceiptErrors | null; @@ -154,11 +154,11 @@ type UserListItemProps = ListItemProps & { FooterComponent?: ReactElement; }; -type InviteMemberListItemProps = UserListItemProps; +type InviteMemberListItemProps = UserListItemProps; -type RadioListItemProps = ListItemProps; +type RadioListItemProps = ListItemProps; -type TableListItemProps = ListItemProps; +type TableListItemProps = ListItemProps; type ValidListItem = typeof RadioListItem | typeof UserListItem | typeof TableListItem | typeof InviteMemberListItem; diff --git a/src/pages/iou/request/step/IOURequestStepParticipants.tsx b/src/pages/iou/request/step/IOURequestStepParticipants.tsx index cebb000b2121..df1c62daea5a 100644 --- a/src/pages/iou/request/step/IOURequestStepParticipants.tsx +++ b/src/pages/iou/request/step/IOURequestStepParticipants.tsx @@ -152,16 +152,13 @@ function IOURequestStepParticipants({ testID={IOURequestStepParticipants.displayName} includeSafeAreaPaddingBottom={false} > - {({didScreenTransitionEnd}) => ( - - )} + ); }