Skip to content

Commit

Permalink
Merge pull request Expensify#20736 from dukenv0307/fix/19231
Browse files Browse the repository at this point in the history
Fix: Remain focus when selecting option
  • Loading branch information
arosiclair authored Jul 5, 2023
2 parents e753f4d + fdb9f85 commit 0faef9d
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import CONST from '../../../../CONST';
import withLocalize, {withLocalizePropTypes} from '../../../../components/withLocalize';
import compose from '../../../../libs/compose';
import personalDetailsPropType from '../../../personalDetailsPropType';
import * as Browser from '../../../../libs/Browser';
import reportPropTypes from '../../../reportPropTypes';

const propTypes = {
Expand Down Expand Up @@ -140,11 +141,8 @@ function MoneyRequestParticipantsSplitSelector({betas, participants, personalDet
personalDetails: chatOptions.personalDetails,
userToInvite: chatOptions.userToInvite,
});
if (!isOptionInList) {
setSearchTerm('');
}
},
[searchTerm, participants, onAddParticipants, reports, personalDetails, betas, setNewChatOptions, setSearchTerm],
[searchTerm, participants, onAddParticipants, reports, personalDetails, betas, setNewChatOptions],
);

const headerMessage = OptionsListUtils.getHeaderMessage(
Expand Down Expand Up @@ -181,6 +179,7 @@ function MoneyRequestParticipantsSplitSelector({betas, participants, personalDet
textInputLabel={translate('optionsSelector.nameEmailOrPhoneNumber')}
safeAreaPaddingBottomStyle={safeAreaPaddingBottomStyle}
shouldShowOptions={isOptionsDataReady}
shouldFocusOnSelectRow={!Browser.isMobile()}
/>
</View>
);
Expand Down

0 comments on commit 0faef9d

Please sign in to comment.