Untitled

 avatar
unknown
plain_text
a year ago
1.4 kB
5
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