[docs][joy-ui][input] Inputs as decorators for other inputs in forms
@siriwatknp is already working on this.
Since Oct 31, 2023.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Duplicates
- I have searched the existing issues
Related page
https://mui.com/joy-ui/react-input/#decorators
Kind of issue
Other
Issue description
The decorator documentation of Input kicks off with an Input that has another Input as its endDecorator. But as soon as you'd want to use that in an actual form with a FormLabel and FormHelperText component wrapped in a FormControl, Joy UI will start throwing errors at you that you aren't allowed to do this.
A FormControl can contain only one control component (Autocomplete | Input | Textarea | Select | RadioGroup)
You should not mix those components inside a single FormControl instance
Context 🔦
I feel like this demo should be something that can actually be used in a context that goes beyond "I just want 2 inputs" and works with Joy UI's other components. This demo specifically could be fixed by replacing the Select with a Dropdown to achieve roughly the same result.
Then again... mayhaps changes should be made to FormControl to allow 2 or more inputs. Examples like the demo feel like a common usecase (e.g.: a search box with a control to specify where you want to look).
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.