Skip to content

Commit

Permalink
docs:typescript:formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Apr 21, 2019
1 parent a0e89fb commit ebde89d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/src/pages/demos/text-fields/ComposedTextField.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ const useStyles = makeStyles(theme => ({
function ComposedTextField() {
const [labelWidth, setLabelWidth] = React.useState(0);
const [name, setName] = React.useState('Composed TextField');
const label = React.useRef(null);
const labelRef = React.useRef(null);
const classes = useStyles();

React.useEffect(() => {
setLabelWidth(label.current.offsetWidth);
setLabelWidth(labelRef.current.offsetWidth);
}, []);

function handleChange(event) {
Expand Down Expand Up @@ -63,7 +63,7 @@ function ComposedTextField() {
<FormHelperText id="component-error-text">Error</FormHelperText>
</FormControl>
<FormControl className={classes.formControl} variant="outlined">
<InputLabel ref={label} htmlFor="component-outlined">
<InputLabel ref={labelRef} htmlFor="component-outlined">
Name
</InputLabel>
<OutlinedInput
Expand Down

0 comments on commit ebde89d

Please sign in to comment.