Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function AddPersonalNewCardPage() {
CurrentStep = <PlaidConnectionStep onExit={() => setIsModalVisible(true)} />;
break;
default:
CurrentStep = <SelectCountryStep />;
CurrentStep = <SelectCountryStep disableAutoFocus={isModalVisible} />;
break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ function PlaidConnectionStep({feed, onExit}: {feed?: CompanyCardFeedWithDomainID
}

// disabling this rule, as we want this to run only on the first render
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import CONST from '@src/CONST';
import type {TranslationPaths} from '@src/languages/types';
import ONYXKEYS from '@src/ONYXKEYS';

function SelectCountryStep() {
function SelectCountryStep({disableAutoFocus}: {disableAutoFocus?: boolean}) {
const {translate, localeCompare} = useLocalize();
const styles = useThemeStyles();
const {currencyList} = useCurrencyListState();
Expand Down Expand Up @@ -112,6 +112,7 @@ function SelectCountryStep() {
value: searchValue,
label: translate('common.search'),
onChangeText: setSearchValue,
disableAutoFocus,
}}
confirmButtonOptions={{
onConfirm: submit,
Expand Down
Loading