有人可以告诉我为什么当焦点位于输入字段时,React 中的 datepicker 会闪烁吗?
我在我的演示中使用这个日期选择器
https://www.npmjs.com/package/semantic-ui-calendar-react
but it 焦点闪烁或者换句话说,当我专注于输入字段时,它首先显示在顶部,然后显示在输入字段下方,为什么?
这是我的代码
https://codesandbox.io/s/prod-hill-mpurn https://codesandbox.io/s/prod-hill-mpurn
<div style={{ position: "absolute", top: 100, left: 100 }}>
<DateInput
name="date"
placeholder="Date"
value={date}
popupPosition="right"
onChange={handleChange}
/>
</div>
任何更新 ?
它有一个默认动画scale
。您可以通过传递 prop `animation={false} 来关闭它,如下所示。
<DateInput
name="date"
placeholder="Date"
value={date}
popupPosition="right"
onChange={handleChange}
animation={false}
/>
代码沙箱:https://codesandbox.io/s/hloid https://codesandbox.io/s/hloid
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)