-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix: show checkbox with multiselect #19665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7921322
302d8e9
7d1f85d
039973f
465eea1
8b46b69
1e5962f
08127ea
2a66be0
79fa9a6
4b62388
29e3f2a
e19ce79
8032886
58fd801
6ae0e0e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
import React, { memo, useCallback } from 'react'; | ||
import { TouchableOpacity } from 'react-native'; | ||
import { TouchableOpacity, View } from 'react-native'; | ||
|
||
import { useStyles } from '../../../../hooks'; | ||
import AccountCell from '../../AccountCell'; | ||
import createStyles from '../MultichainAccountSelectorList.styles'; | ||
import { AccountListCellProps } from './AccountListCell.types'; | ||
import Checkbox from '../../../../components/Checkbox'; | ||
|
||
const AccountListCell = memo( | ||
({ | ||
accountGroup, | ||
avatarAccountType, | ||
isSelected, | ||
onSelectAccount, | ||
showCheckbox = false, | ||
}: AccountListCellProps) => { | ||
const { styles } = useStyles(createStyles, {}); | ||
|
||
|
@@ -26,6 +28,13 @@ const AccountListCell = memo( | |
activeOpacity={0.7} | ||
> | ||
<AccountCell | ||
startAccessory={ | ||
showCheckbox ? ( | ||
<View testID={`account-list-cell-checkbox-${accountGroup.id}`}> | ||
<Checkbox isChecked={isSelected} onPress={handlePress} /> | ||
</View> | ||
) : undefined | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Double Event Triggering in Nested PressablesWhen |
||
accountGroup={accountGroup} | ||
avatarAccountType={avatarAccountType} | ||
isSelected={isSelected} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we extract this into its own component?