Skip to content

Commit

Permalink
early return on handle long press if screen not focused
Browse files Browse the repository at this point in the history
  • Loading branch information
FitseTLT committed Oct 31, 2024
1 parent 664e657 commit 32d4a1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/SelectionListWithModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function SelectionListWithModal<TItem extends ListItem>(

const handleLongPressRow = (item: TItem) => {
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
if (!turnOnSelectionModeOnLongPress || !isSmallScreenWidth || item?.isDisabled || item?.isDisabledCheckbox) {
if (!turnOnSelectionModeOnLongPress || !isSmallScreenWidth || item?.isDisabled || item?.isDisabledCheckbox || !isFocused) {
return;
}
setLongPressedItem(item);
Expand Down

0 comments on commit 32d4a1c

Please sign in to comment.