问题描述
单击提交按钮后,如果显示空白,则显示为错误消息的弹出框应为空。
当前,anchorEl设置为e.currentTarget。如何选择“发件人”目的地的元素?
<Grid item xs sm={3}>
<Box className={classes.border} position="relative">
<IconButton
className={classes.changeBtn}
onClick={switchDestinations}
color="primary"
>
<SwapHorizIcon />
</IconButton>
<Box pl={2} pt={1}>
<Typography
className={classes.weight}
variant="caption"
color="textSecondary"
>
{t('search from').toupperCase()}
</Typography>
</Box>
<Box pl={1}>
<AutoCompleteInput
renderOption={renderOption}
fetch={getCities}
value={from}
onChange={(_,value) => setFrom(value)}
array={array}
optionLabel={optionLabel}
label={t('search from').toupperCase()}
placeholder={t('search from').toupperCase()}
desktop
/>
</Box>
</Box>
<Popover
// id={id}
open={open}
anchorEl={anchorEl}
onClose={handleClose}
anchorOrigin={{
vertical: 'bottom',horizontal: 'center',}}
transformOrigin={{
vertical: 'top',}}
>
<Typography className={classes.typography}>
Please enter place of departure
</Typography>
</Popover>
</Grid>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)