I want to use full width in the Form Control Label component.
See original GitHub issueDuplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Summary 💡
function initItemsTemplate(items) {
return items.map((answer, i) => {
return (
<Box key={i}>
<FormControlLabel
label={
<Typography key={i.toString()} variant="body2"
fullwidth
style={{ margin: '2px 0px 0px 0px' }}
children={`${answer.example}`}/>}
control={<Checkbox
defaultChecked={answer.isChecked}
style={{ marginLeft: '0px'}}
onchange
onChange={(event) => answerChecked(event, answer.id)}/>}/>
</Box>
);
})
}
This is FormControlLabel component.
And the pink area is an area where you can click FormControlLabel.
I want the Checkbox event to work when I click on all areas as below.
Examples 🌈
This is a page that actually works. GitHub Source code parts.
Motivation 🔦
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Can fullWidth be added to the FormControl context ... - GitHub
I would like to be able to consume the fullWidth FormControl state prop from the ... but multiple Material-UI components that use fullWidth....
Read more >FormControlLabel API - Material UI - MUI
API reference docs for the React FormControlLabel component. Learn about the props, CSS, and other APIs of this exported module.
Read more >C38: Using CSS width, max-width and flexbox to fit labels and ...
Define the width and max-width property for labels and inputs so they enlarge or shrink in the available space and respond to zoom...
Read more >Forms - Bootstrap
Create horizontal forms with the grid by adding the .row class to form groups and using the .col-*-* classes to specify the width...
Read more >Form Element - Lightning Design System
A form label should use either the <label> or <legend> elements with the class ... form elements will have an increased size of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@abhinav-22-tech Thank you. That’s exactly what I want.
FormGroup
Yes, You will also use
FormGroup
.Check out: https://codesandbox.io/s/cocky-cannon-3kzr9?file=/src/Demo.tsx