material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

MuiTextField inputProps for "form" will disable onSubmit handler.

Open Interject-VictorC opened this issue 2 years ago • 1 comments

Duplicates

  • [X] I have searched the existing issues

Latest version

  • [X] I have tested the latest version

Steps to reproduce 🕹

Steps:

  1. set default props for MuiTextField in the theme with the following props... MuiTextField: { defaultProps: { inputProps: { autoComplete: 'new-password', form: { type: 'submit', autoComplete: 'off', }, }, autoComplete: 'off', size: 'small', margin: 'dense', variant: 'outlined', fullWidth: true, }, },

Current behavior 😯

Form will lose the onSubmit() event on Enter

Expected behavior 🤔

I expected to be able to submit my form after I hit enter.

Context 🔦

No response

Your environment 🌎

"react": "^18.2.0", "@mui/material": "^5.9.3",

Interject-VictorC avatar Sep 17 '22 05:09 Interject-VictorC

It doesn't look like this bug report has enough info for one of us to reproduce it.

Please provide a CodeSandbox (https://mui.com/r/issue-template), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem.

Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve

ZeeshanTamboli avatar Sep 19 '22 09:09 ZeeshanTamboli

Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information.

github-actions[bot] avatar Sep 26 '22 09:09 github-actions[bot]