how to get value from autocomplete of material ui react code example

Example 1: how to get value from autocomplete material ui

<Autocomplete
    onChange={(event, value) => console.log(value)} // prints the selected value
    .....
    renderInput={params => (
        <TextField {...params} label="Label" variant="outlined" fullWidth />
    )}
/>

Example 2: how to turn of autocomplete in react hook form material ui

<TextField
                inputRef={input}
                {...params}
                inputProps={{
                    ...params.inputProps,
                    autoComplete: "disabled", // disable autocomplete and autofill
                }}
                margin="none"
                fullWidth
            />

Tags:

Misc Example