Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] 操作DatePicker.RangePicker的renderExtraFooter上定义的控件时,面板会关闭 #33125

Closed
1 task
Hitotsubashi opened this issue Dec 2, 2021 · 16 comments · May be fixed by react-component/picker#683
Labels
🐛 Bug Ant Design Team had proved that this is a bug. help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. Inactive

Comments

@Hitotsubashi
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

点开日期选择器,然后点击renderExtraFooter中定义的Radio.Group中任意一项,弹出面板会关闭

What is expected?

面板不应该关闭

What is actually happening?

面板会关闭

Environment Info
antd 4.17.2
React 17.0.2
System mac
Browser chrome 96.0.4664.45
@afc163
Copy link
Member

afc163 commented Dec 2, 2021

@afc163 afc163 closed this as completed Dec 2, 2021
@Hitotsubashi
Copy link
Author

阻止一下冒泡:https://codesandbox.io/s/sharp-robinson-8i664?file=/src/App.js

https://codesandbox.io/s/sharp-robinson-8i664?file=/src/App.js
你好,你这个加了stopPropagation也没效果。

@afc163 afc163 reopened this Dec 2, 2021
@afc163
Copy link
Member

afc163 commented Dec 2, 2021

https://codesandbox.io/s/eloquent-pond-kygbw?file=/src/App.js

这样,避免焦点丢失。

@Hitotsubashi
Copy link
Author

https://codesandbox.io/s/eloquent-pond-kygbw?file=/src/App.js

这样,避免焦点丢失。

还是达不到效果

@afc163 afc163 added the 🐛 Bug Ant Design Team had proved that this is a bug. label Dec 2, 2021
@afc163
Copy link
Member

afc163 commented Dec 2, 2021

晚点再看看,有空也可以帮我们排查一下。

@hydraZty
Copy link
Contributor

hydraZty commented Dec 2, 2021

原因感觉没那么简单,试了下默认样式的 Radio,点击⚪中就不会触发日期面板关闭。点击单选其他位置还是会触发关闭。
@Hitotsubashi 业务上先用 Button 实现单选避开 Radio 吧。

@haungxinyan
Copy link

今天加了个Select也遇到了这个问题
点击Select还没来得及展开日历就关闭了

@arno3713
Copy link

😳input也无法聚焦

@standbyoneself
Copy link

Same...

@Rachel-Shen
Copy link

不加 stopPropagation input也无法聚焦,加了 stopPropagation 一聚焦面板就关闭了😳 请问还有什么解决方案嘛

@xjhjzxh
Copy link

xjhjzxh commented Apr 24, 2023

same problem, 暂时用主动控制open的方法解决了, 但感觉不是个好方案

@afc163 afc163 added the help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. label Oct 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2023

Hello @Hitotsubashi. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch (feature branch for the new feature, master for bugfix and other changes), fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

你好 @Hitotsubashi,我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到正确的分支(新特性发到 feature 分支,其他发到 master 分支),务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

giphy

@Yuiai01
Copy link
Contributor

Yuiai01 commented Oct 7, 2023

我来尝试解决一下。

@crazyair
Copy link
Member

我来尝试解决一下。

这个问题是 4.0 的,解决需要在 4.0 解决吗

@Yuiai01
Copy link
Contributor

Yuiai01 commented Oct 10, 2023

我来尝试解决一下。

这个问题是 4.0 的,解决需要在 4.0 解决吗

需要的,本来是想着到时候 copy 过去的。

@zombieJ
Copy link
Member

zombieJ commented Feb 20, 2024

Picker component has been refactor in 5.14.0, and this issue is discussed and handled with react-component/picker#691 which will be marked as closed.

Please feel free to create new issue if you have any further question :)

Picker 组件于 5.14.0 版本进行了重构,此问题已被 react-component/picker#691 中进行讨论与处理。

如果有任何问题,欢迎随时创建新的 issue :)

@zombieJ zombieJ closed this as completed Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Ant Design Team had proved that this is a bug. help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. Inactive
Projects
None yet
Development

Successfully merging a pull request may close this issue.