Skip to content

Commit

Permalink
fix: disable autocomplete on numeric fields
Browse files Browse the repository at this point in the history
  • Loading branch information
belopash committed Jun 6, 2024
1 parent 0afc6bf commit 95ecc9e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/components/Form/FormikTextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export function FormikTextInput({
InputProps,
error,
sx,
autoComplete,
onFocus,
onBlur,
showErrorOnlyOfTouched = false,
Expand All @@ -64,6 +65,7 @@ export function FormikTextInput({
type?: 'text' | 'password';
sx?: SxProps;
InputProps?: Partial<StandardInputProps>;
autoComplete?: string;
onFocus?: () => unknown;
onBlur?: () => unknown;
}) {
Expand Down Expand Up @@ -98,6 +100,7 @@ export function FormikTextInput({
error={Boolean(actualError)}
sx={sx}
helperText={actualError || helperText}
autoComplete={autoComplete}
InputProps={
InputProps || {
endAdornment:
Expand Down
1 change: 1 addition & 0 deletions src/pages/GatewaysPage/GatewayStake.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ export function GatewayStake({ disabled }: { disabled?: boolean }) {
label="Amount"
formik={formik}
showErrorOnlyOfTouched
autoComplete="off"
InputProps={{
endAdornment: (
<Chip
Expand Down
1 change: 1 addition & 0 deletions src/pages/WorkersPage/WorkerDelegate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export function WorkerDelegate({
label="Amount"
formik={formik}
showErrorOnlyOfTouched
autoComplete="off"
InputProps={{
endAdornment: (
<Chip
Expand Down
3 changes: 2 additions & 1 deletion src/pages/WorkersPage/WorkerUndelegate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function WorkerUndelegate({
const formik = useFormik({
initialValues: {
source: '',
amount: '0',
amount: '',
max: '0',
},
validationSchema: undelegateSchema,
Expand Down Expand Up @@ -166,6 +166,7 @@ export function WorkerUndelegate({
id="amount"
label="Amount"
formik={formik}
autoComplete="off"
InputProps={{
endAdornment: (
<Chip
Expand Down

0 comments on commit 95ecc9e

Please sign in to comment.