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

fix(form): onOpenChange fires twice when opening ModalForm #8311

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

zhuba-Ahhh
Copy link
Contributor

@zhuba-Ahhh zhuba-Ahhh commented Apr 15, 2024

close: #8156
close: #7545
image

Copy link

github-actions bot commented Apr 15, 2024

😭 Deploy PR Preview failed.

@zhuba-Ahhh zhuba-Ahhh closed this Apr 15, 2024
@zhuba-Ahhh zhuba-Ahhh reopened this Apr 15, 2024
@zhuba-Ahhh
Copy link
Contributor Author

zhuba-Ahhh commented Apr 15, 2024

这里的onOpenChange我理解初始open为true时不应当触发,可以讨论下是使用useEffect还是useMergeState

@chenshuai2144 chenshuai2144 changed the title fix(ModalForm): onOpenChange fires twice when opening ModalForm fix(form): onOpenChange fires twice when opening ModalForm Apr 17, 2024
@chenshuai2144 chenshuai2144 merged commit f12ef2b into ant-design:master Apr 17, 2024
13 of 15 checks passed
@chenshuai2144
Copy link
Contributor

useMergeState 吧,少一次render是好事

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants