[material-ui] Add readOnly prop to all form input elements
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Summary
Make the readOnly attribute available as a first order prop on all input elements like TextField, Switch, Select etc. just like disabled is right now.
Examples
No response
Motivation
Since react-hook-form have started to actually follow the HTML spec disabled input values are undefined on form submit. Instead we are supposed to correctly use the read-only attribute, which make sense thinking about it.
Hence it would be preferable if this prop was available directly on every input element in MUI instead of having to dig down into underlying props which is both less easy on the eye and less easy to find in the documentation.
Bonus points for having some kind of default styling indicating that a read-only element is indeed not mutable.
Search keywords: readonly prop input
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.