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

rangepicker open属性受控下 行为有问题 #44992

Closed
adolfheir opened this issue Sep 21, 2023 · 10 comments · Fixed by react-component/picker#678 · May be fixed by react-component/picker#685
Closed

rangepicker open属性受控下 行为有问题 #44992

adolfheir opened this issue Sep 21, 2023 · 10 comments · Fixed by react-component/picker#678 · May be fixed by react-component/picker#685
Labels
🐛 Bug Ant Design Team had proved that this is a bug.

Comments

@adolfheir
Copy link

adolfheir commented Sep 21, 2023

Reproduction link

Edit on CodeSandbox

Steps to reproduce

open受控下 onopench
Sep-21-2023 14-29-49
ange 没有回调

What is expected?

open受控下 onopenchange 正确关闭

What is actually happening?

open受控下 onopenchange 点击确定没响应

Environment Info
antd 5.9.2
React react
System mac
Browser chrome
@Yuiai01
Copy link
Contributor

Yuiai01 commented Sep 21, 2023

看了下,你最开始点击打开时间选择面板的时候就将 isOpen 设置为了 false, 这可能是导致后续无法关闭的原因。

@adolfheir
Copy link
Author

看了下,你最开始点击打开时间选择面板的时候就将 isOpen 设置为了 false, 这可能是导致后续无法关闭的原因。

请看代码 只是默认值false 后续都是组件传出来的状态

@Yuiai01
Copy link
Contributor

Yuiai01 commented Sep 21, 2023

看了下,你最开始点击打开时间选择面板的时候就将 isOpen 设置为了 false, 这可能是导致后续无法关闭的原因。

请看代码 只是默认值false 后续都是组件传出来的状态

嗯嗯

@Yuiai01
Copy link
Contributor

Yuiai01 commented Sep 21, 2023

是 rc-picker 那边的问题,我来跟一下。

@yoyo837
Copy link
Contributor

yoyo837 commented Sep 21, 2023

Broken by react-component/picker#663.

@pengfan2013
Copy link

pengfan2013 commented Oct 8, 2023

在日期选择下的open受控仍然存在问题.
https://codesandbox.io/s/e-wai-de-ye-jiao-antd-5-9-2-forked-66jzhy?from-embed
@Yuiai01

@Yuiai01
Copy link
Contributor

Yuiai01 commented Oct 8, 2023

在日期选择下的open受控仍然存在问题. https://codesandbox.io/s/e-wai-de-ye-jiao-antd-5-9-2-forked-66jzhy?from-embed @Yuiai01

好的,我来跟一下

@Yuiai01
Copy link
Contributor

Yuiai01 commented Oct 8, 2023

在日期选择下的open受控仍然存在问题. https://codesandbox.io/s/e-wai-de-ye-jiao-antd-5-9-2-forked-66jzhy?from-embed @Yuiai01

在 openChange 的时候将 open 设置为了 true,因此他不会关闭面板。不过初始设置为 false,按理说应该打不开面板啊 🤔

@pengfan2013
Copy link

在日期选择下的open受控仍然存在问题. https://codesandbox.io/s/e-wai-de-ye-jiao-antd-5-9-2-forked-66jzhy?from-embed @Yuiai01

在 openChange 的时候将 open 设置为了 true,因此他不会关闭面板。不过初始设置为 false,按理说应该打不开面板啊 🤔

日期选择并没有确认按钮, 应是选择日期即会失去焦点, 进而应该触发openChange, 将open设置成false, 不然的话, 这里好像没办法"受控"

@Yuiai01
Copy link
Contributor

Yuiai01 commented Oct 8, 2023

在日期选择下的open受控仍然存在问题. https://codesandbox.io/s/e-wai-de-ye-jiao-antd-5-9-2-forked-66jzhy?from-embed @Yuiai01

在 openChange 的时候将 open 设置为了 true,因此他不会关闭面板。不过初始设置为 false,按理说应该打不开面板啊 🤔

日期选择并没有确认按钮, 应是选择日期即会失去焦点, 进而应该触发openChange, 将open设置成false, 不然的话, 这里好像没办法"受控"

嗯嗯,我跟进一下。

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.
Projects
None yet
5 participants