<Autocomplete
id="google-map-demo"
defaultValue={userData.addressLine1 || ''}
freeSolo // <-- Add this line
clearOnEscape={false}
clearIcon={null}
// ...rest of your props
/>
onChange={(event: any, newValue: PlaceType | string | null) => {
if (typeof newValue === 'string') {
// The user entered a new address manually
setAddress(newValue);
console.log('Manual input:', newValue);
} else if (newValue) {
// The user selected an address from the dropdown
setAddress(newValue.description);
console.log('Selected Value:', newValue.description);
}
}}