Skip to content

Commit

Permalink
Merge pull request #49166 from Nodebrute/autofocus
Browse files Browse the repository at this point in the history
fix auto focus
  • Loading branch information
Julesssss authored Sep 16, 2024
2 parents 786240e + 375585e commit b00b9bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/workspace/rules/RulesCustomNamePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import ScreenWrapper from '@components/ScreenWrapper';
import Text from '@components/Text';
import TextInput from '@components/TextInput';
import TextLink from '@components/TextLink';
import useAutoFocusInput from '@hooks/useAutoFocusInput';
import useLocalize from '@hooks/useLocalize';
import usePolicy from '@hooks/usePolicy';
import useThemeStyles from '@hooks/useThemeStyles';
Expand All @@ -30,7 +31,7 @@ function RulesCustomNamePage({route}: RulesCustomNamePageProps) {

const {translate} = useLocalize();
const styles = useThemeStyles();

const {inputCallbackRef} = useAutoFocusInput();
const RULE_EXAMPLE_BULLET_POINTS = [
translate('workspace.rules.expenseReportRules.customNameEmailPhoneExample'),
translate('workspace.rules.expenseReportRules.customNameStartDateExample'),
Expand Down Expand Up @@ -95,6 +96,7 @@ function RulesCustomNamePage({route}: RulesCustomNamePageProps) {
label={translate('workspace.rules.expenseReportRules.customNameInputLabel')}
aria-label={translate('workspace.rules.expenseReportRules.customNameInputLabel')}
maxLength={CONST.WORKSPACE_NAME_CHARACTER_LIMIT}
ref={inputCallbackRef}
/>
<BulletList
items={RULE_EXAMPLE_BULLET_POINTS}
Expand Down

0 comments on commit b00b9bc

Please sign in to comment.