Skip to content

Commit

Permalink
Merge pull request #38843 from Expensify/cmartins-autoFocus
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisl authored Mar 22, 2024
2 parents 7dc0cfc + 46f3a30 commit 3bea03a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pages/workspace/taxes/ValuePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {FormOnyxValues} from '@components/Form/types';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import ScreenWrapper from '@components/ScreenWrapper';
import Text from '@components/Text';
import useAutoFocusInput from '@hooks/useAutoFocusInput';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import {updatePolicyTaxValue, validateTaxValue} from '@libs/actions/TaxRate';
Expand Down Expand Up @@ -35,6 +36,7 @@ function ValuePage({
}: ValuePageProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();
const {inputCallbackRef} = useAutoFocusInput();
const currentTaxRate = PolicyUtils.getTaxByID(policy, taxID);
const [value, setValue] = useState(currentTaxRate?.value?.replace('%', ''));

Expand Down Expand Up @@ -89,6 +91,7 @@ function ValuePage({
onInputChange={setValue}
hideCurrencySymbol
extraSymbol={<Text style={styles.iouAmountText}>%</Text>}
ref={inputCallbackRef}
/>
</FormProvider>
</ScreenWrapper>
Expand Down

0 comments on commit 3bea03a

Please sign in to comment.