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
9 changes: 5 additions & 4 deletions src/components/ConnectToNetSuiteFlow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ function ConnectToNetSuiteFlow({policyID}: ConnectToNetSuiteFlowProps) {
if (threeDotsMenuContainerRef) {
if (!shouldUseNarrowLayout) {
threeDotsMenuContainerRef.current?.measureInWindow((x, y, width, height) => {
setReuseConnectionPopoverPosition({
horizontal: x + width,
vertical: y + height,
});
const horizontal = x + width;
const vertical = y + height;
if (reuseConnectionPopoverPosition.horizontal !== horizontal || reuseConnectionPopoverPosition.vertical !== vertical) {
setReuseConnectionPopoverPosition({horizontal, vertical});
}
});
}

Expand Down
9 changes: 5 additions & 4 deletions src/components/ConnectToSageIntacctFlow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ function ConnectToSageIntacctFlow({policyID}: ConnectToSageIntacctFlowProps) {
if (threeDotsMenuContainerRef) {
if (!shouldUseNarrowLayout) {
threeDotsMenuContainerRef.current?.measureInWindow((x, y, width, height) => {
setReuseConnectionPopoverPosition({
horizontal: x + width,
vertical: y + height,
});
const horizontal = x + width;
const vertical = y + height;
if (reuseConnectionPopoverPosition.horizontal !== horizontal || reuseConnectionPopoverPosition.vertical !== vertical) {
setReuseConnectionPopoverPosition({horizontal, vertical});
}
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import HeaderWithBackButton from '@components/HeaderWithBackButton';
import ScreenWrapper from '@components/ScreenWrapper';
import Text from '@components/Text';
import TextInput from '@components/TextInput';
import useAutoFocusInput from '@hooks/useAutoFocusInput';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import {connectToSageIntacct} from '@libs/actions/connections/SageIntacct';
Expand All @@ -24,6 +25,7 @@ type SageIntacctPrerequisitesPageProps = PlatformStackScreenProps<SettingsNaviga
function EnterSageIntacctCredentialsPage({route}: SageIntacctPrerequisitesPageProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();
const {inputCallbackRef} = useAutoFocusInput();
const policyID: string = route.params.policyID;

const confirmCredentials = useCallback(
Expand Down Expand Up @@ -70,14 +72,15 @@ function EnterSageIntacctCredentialsPage({route}: SageIntacctPrerequisitesPagePr
shouldValidateOnChange
>
<Text style={[styles.textHeadlineH1, styles.pb5, styles.pt3]}>{translate('workspace.intacct.enterCredentials')}</Text>
{formItems.map((formItem) => (
{formItems.map((formItem, index) => (
<View
style={styles.mb4}
key={formItem}
>
<InputWrapper
InputComponent={TextInput}
inputID={formItem}
ref={index === 0 ? inputCallbackRef : undefined}
label={translate(`common.${formItem}`)}
aria-label={translate(`common.${formItem}`)}
role={CONST.ROLE.PRESENTATION}
Expand Down