如何添加由UI Lib(ANTD)渲染的元素上的预防默认不足?
我正在使用Select在内部(React App)中使用rangepicker。问题在于,RP呈现身体标签中的下拉日历,当我按下它时,选择即将关闭。据我了解,如果我将单击事件放置防止Defaut,它将修复。有办法做到吗?
<body>
<root>
<div classname=app>
My select is a n-th (may be like 7-10) child of this tag
</div>
</root>
<div>
<dropdown /> <---- that I need to add prevent default
</div>
</body>
I'm using Select with a RangePicker inside (React app). The problem is that RP rendering dropdown calendar in body tag and when I press on it Select is closing. As I understand it will be fixed if I put click event prevent defaut. Is there a way to do it?
<body>
<root>
<div classname=app>
My select is a n-th (may be like 7-10) child of this tag
</div>
</root>
<div>
<dropdown /> <---- that I need to add prevent default
</div>
</body>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
选择组件中有一个
下拉列为
属性。使用它,您可以自定义组件的渲染(渲染,样式,属性等)。There is a
dropdownRender
property in the Select component. With it you can customize the render of the component (parent of render, styles, properties etc).