Untitled
unknown
plain_text
2 years ago
1.4 kB
8
Indexable
<Controller
name='selectemail'
rules={{ required: true }}
control={control}
render={({ field: { value, onChange } }) => (
<CustomTextField1
select
fullWidth
style={{ width: '550px', marginTop: '20px' }}
defaultValue=''
label='Choose an Email Account'
SelectProps={{
value: value,
onChange: e => {
onChange(e)
localStorage.setItem('emailemail', e.target.value)
}
}}
id='validation-basic-select'
error={Boolean(errors.select)}
aria-describedby='validation-basic-select'
{...(errors.select && {
helperText: 'This field is required'
})}
>
{emailList.map((location, index) => (
<MenuItem key={index} value={emailList[index].username}>
{emailList[index].username}
</MenuItem>
))}
</CustomTextField1>
)}
/>Editor is loading...
Leave a Comment