Skip to content

Commit

Permalink
Merge pull request Expensify#44360 from huzaifa-99/24074-fix-double-c…
Browse files Browse the repository at this point in the history
…lick-multi-navigation

Updated SelectionList `onSelectRow` debounce to trailing edge if `shouldDebounceRowSelect = true`
  • Loading branch information
mountiny authored Jun 25, 2024
2 parents ec443c9 + 2957ec7 commit 8c5f325
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/SelectionList/BaseSelectionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ function BaseSelectionList<TItem extends ListItem>(
}, [onChangeText]);

// eslint-disable-next-line react-hooks/exhaustive-deps
const debouncedOnSelectRow = useCallback(lodashDebounce(onSelectRow, 1000, {leading: true}), [onSelectRow]);
const debouncedOnSelectRow = useCallback(lodashDebounce(onSelectRow, 200), [onSelectRow]);

/**
* Logic to run when a row is selected, either with click/press or keyboard hotkeys.
Expand Down

0 comments on commit 8c5f325

Please sign in to comment.