Skip to content

Commit af258b3

Browse files
committed
fixPR comments
1 parent 53c9ce8 commit af258b3

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/components/SelectionList/Search/TransactionListItem.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ function TransactionListItem<TItem extends ListItem>({
8787
handleActionButtonPressUtil(currentSearchHash, transactionItem, () => onSelectRow(item), shouldUseNarrowLayout && !!canSelectMultiple);
8888
}, [canSelectMultiple, currentSearchHash, item, onSelectRow, shouldUseNarrowLayout, transactionItem]);
8989

90+
const handleCheckboxPress = useCallback(() => {
91+
onCheckboxPress?.(item);
92+
}, [item, onCheckboxPress]);
93+
9094
return (
9195
<BaseListItem
9296
item={item}
@@ -119,7 +123,7 @@ function TransactionListItem<TItem extends ListItem>({
119123
transactionItem={transactionItem}
120124
shouldShowTooltip={showTooltip}
121125
onButtonPress={handleActionButtonPress}
122-
onCheckboxPress={() => onCheckboxPress?.(item)}
126+
onCheckboxPress={handleCheckboxPress}
123127
shouldUseNarrowLayout={!isLargeScreenWidth}
124128
columns={columns}
125129
isParentHovered={hovered}

src/hooks/useMobileSelectionMode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ONYXKEYS from '@src/ONYXKEYS';
44
import useOnyx from './useOnyx';
55

66
export default function useMobileSelectionMode() {
7-
const [isSelectionModeEnabled] = useOnyx(ONYXKEYS.MOBILE_SELECTION_MODE, {canBeMissing: true});
7+
const [isSelectionModeEnabled] = useOnyx(ONYXKEYS.MOBILE_SELECTION_MODE, {initialValue: false, initWithStoredValues: false, canBeMissing: true});
88
const initialSelectionModeValueRef = useRef(isSelectionModeEnabled);
99

1010
useEffect(() => {

0 commit comments

Comments
 (0)