如何添加由UI Lib(ANTD)渲染的元素上的预防默认不足?

发布于 2025-02-13 09:55:31 字数 432 浏览 0 评论 0原文

我正在使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谁与争疯 2025-02-20 09:55:31

选择组件中有一个下拉列为属性。使用它,您可以自定义组件的渲染(渲染,样式,属性等)。

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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文