Skip to content

Commit

Permalink
Merge pull request #42380 from tienifr/fix/41922
Browse files Browse the repository at this point in the history
fix User has to click twice to select currency
  • Loading branch information
Julesssss authored Jun 13, 2024
2 parents fc6d67e + 0b253d0 commit fb323f6
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 15 deletions.
3 changes: 1 addition & 2 deletions src/components/SelectionList/BaseListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ function BaseListItem<TItem extends ListItem>({
wrapperStyle,
containerStyle,
isDisabled = false,
shouldPreventDefaultFocusOnSelectRow = false,
shouldPreventEnterKeySubmit = false,
canSelectMultiple = false,
onSelectRow,
Expand Down Expand Up @@ -88,7 +87,7 @@ function BaseListItem<TItem extends ListItem>({
hoverDimmingValue={1}
hoverStyle={[!item.isDisabled && styles.hoveredComponentBG, hoverStyle]}
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}}
onMouseDown={shouldPreventDefaultFocusOnSelectRow ? (e) => e.preventDefault() : undefined}
onMouseDown={(e) => e.preventDefault()}
id={keyForList ?? ''}
style={pressableStyle}
onFocus={onFocus}
Expand Down
2 changes: 0 additions & 2 deletions src/components/SelectionList/InviteMemberListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ function InviteMemberListItem<TItem extends ListItem>({
onSelectRow,
onCheckboxPress,
onDismissError,
shouldPreventDefaultFocusOnSelectRow,
rightHandSideComponent,
onFocus,
shouldSyncFocus,
Expand Down Expand Up @@ -56,7 +55,6 @@ function InviteMemberListItem<TItem extends ListItem>({
canSelectMultiple={canSelectMultiple}
onSelectRow={onSelectRow}
onDismissError={onDismissError}
shouldPreventDefaultFocusOnSelectRow={shouldPreventDefaultFocusOnSelectRow}
rightHandSideComponent={rightHandSideComponent}
errors={item.errors}
pendingAction={item.pendingAction}
Expand Down
2 changes: 0 additions & 2 deletions src/components/SelectionList/RadioListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ function RadioListItem<TItem extends ListItem>({
isDisabled,
onSelectRow,
onDismissError,
shouldPreventDefaultFocusOnSelectRow,
shouldPreventEnterKeySubmit,
rightHandSideComponent,
isMultilineSupported = false,
Expand All @@ -34,7 +33,6 @@ function RadioListItem<TItem extends ListItem>({
showTooltip={showTooltip}
onSelectRow={onSelectRow}
onDismissError={onDismissError}
shouldPreventDefaultFocusOnSelectRow={shouldPreventDefaultFocusOnSelectRow}
shouldPreventEnterKeySubmit={shouldPreventEnterKeySubmit}
rightHandSideComponent={rightHandSideComponent}
keyForList={item.keyForList}
Expand Down
3 changes: 0 additions & 3 deletions src/components/SelectionList/Search/ReportListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ function ReportListItem<TItem extends ListItem>({
canSelectMultiple,
onSelectRow,
onDismissError,
shouldPreventDefaultFocusOnSelectRow,
onFocus,
shouldSyncFocus,
}: ReportListItemProps<TItem>) {
Expand Down Expand Up @@ -119,7 +118,6 @@ function ReportListItem<TItem extends ListItem>({
canSelectMultiple={canSelectMultiple}
onSelectRow={() => openReportInRHP(transactionItem)}
onDismissError={onDismissError}
shouldPreventDefaultFocusOnSelectRow={shouldPreventDefaultFocusOnSelectRow}
onFocus={onFocus}
shouldSyncFocus={shouldSyncFocus}
/>
Expand All @@ -138,7 +136,6 @@ function ReportListItem<TItem extends ListItem>({
canSelectMultiple={canSelectMultiple}
onSelectRow={onSelectRow}
onDismissError={onDismissError}
shouldPreventDefaultFocusOnSelectRow={shouldPreventDefaultFocusOnSelectRow}
errors={item.errors}
pendingAction={item.pendingAction}
keyForList={item.keyForList}
Expand Down
2 changes: 0 additions & 2 deletions src/components/SelectionList/Search/TransactionListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ function TransactionListItem<TItem extends ListItem>({
canSelectMultiple,
onSelectRow,
onDismissError,
shouldPreventDefaultFocusOnSelectRow,
onFocus,
shouldSyncFocus,
}: TransactionListItemProps<TItem>) {
Expand Down Expand Up @@ -42,7 +41,6 @@ function TransactionListItem<TItem extends ListItem>({
canSelectMultiple={canSelectMultiple}
onSelectRow={onSelectRow}
onDismissError={onDismissError}
shouldPreventDefaultFocusOnSelectRow={shouldPreventDefaultFocusOnSelectRow}
errors={item.errors}
pendingAction={item.pendingAction}
keyForList={item.keyForList}
Expand Down
2 changes: 0 additions & 2 deletions src/components/SelectionList/TableListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ function TableListItem<TItem extends ListItem>({
onSelectRow,
onCheckboxPress,
onDismissError,
shouldPreventDefaultFocusOnSelectRow,
rightHandSideComponent,
onFocus,
shouldSyncFocus,
Expand Down Expand Up @@ -53,7 +52,6 @@ function TableListItem<TItem extends ListItem>({
canSelectMultiple={canSelectMultiple}
onSelectRow={onSelectRow}
onDismissError={onDismissError}
shouldPreventDefaultFocusOnSelectRow={shouldPreventDefaultFocusOnSelectRow}
rightHandSideComponent={rightHandSideComponent}
errors={item.errors}
pendingAction={item.pendingAction}
Expand Down
2 changes: 0 additions & 2 deletions src/components/SelectionList/UserListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ function UserListItem<TItem extends ListItem>({
onSelectRow,
onCheckboxPress,
onDismissError,
shouldPreventDefaultFocusOnSelectRow,
shouldPreventEnterKeySubmit,
rightHandSideComponent,
onFocus,
Expand Down Expand Up @@ -59,7 +58,6 @@ function UserListItem<TItem extends ListItem>({
canSelectMultiple={canSelectMultiple}
onSelectRow={onSelectRow}
onDismissError={onDismissError}
shouldPreventDefaultFocusOnSelectRow={shouldPreventDefaultFocusOnSelectRow}
shouldPreventEnterKeySubmit={shouldPreventEnterKeySubmit}
rightHandSideComponent={rightHandSideComponent}
errors={item.errors}
Expand Down

0 comments on commit fb323f6

Please sign in to comment.