March 2019
Intermediate to advanced
534 pages
14h 52m
English
You can use the autoComplete property to control how password values are automatically filled by the browser. A common case for this value is to have the Password field automatically filled on a login screen once the Username field is filled. Here's an example of how you can use this property when you have Username and Password fields on the screen:
import React, { useState } from 'react';import { makeStyles } from '@material-ui/styles';import Grid from '@material-ui/core/Grid';import TextField from '@material-ui/core/TextField';const useStyles = makeStyles(theme => ({ container: { margin: theme.spacing(2) }}));export default function PasswordFields() { const classes = useStyles(); const [username, setUsername] = useState(''); ...Read now
Unlock full access